Product articles SQL Code Snippets

SQL Snippets Galore, Added to SQL Prompt

Imagine having at your fingertips all the metadata queries you need to explore your SQL Server databases and then, a few clicks later, all your diagnostic queries to troubleshoot their performance. Phil Factor demonstrates how it can be done, by storing each set of snippets in a standard JSON collection and using PowerShell to convert them to SQL Prompt snippet files. Read more

Quick SQL Prompt tip – using the CDB snippet

SQL Prompt includes a number of snippets by default that can help you quickly write T-SQL code. These are templates of code that users use regularly. One of the more popular snippets is the ‘cdb’ snippet that helps with quickly creating a new database for development work. This can also be used to ensure production Read more

Quick SQL Prompt tip – using the ii snippet

SQL Prompt includes a number of snippets by default that can help you quickly write T-SQL code. These are templates of code that users use regularly. One of the more popular snippets is the “ii” snippet that helps with inserting data into a table. If I type “ii” and hit tab, I quickly get the Read more

Quick extended properties with SQL Prompt

I’ve been experimenting with Extended Properties, and I found myself slightly annoyed by the syntax of adding and updating Extended Properties. I decided to take advantage of SQL Prompt to store the commonly used code for adding and updating properties. Adding Properties I’m a big fan of naming the snippets the first thing that comes to mind. Read more