Simply tweet: I’ve just read blog on using the column picker with #SQLPrompt – see the #SuperSQLTip at. Like this? Share it with other SQL professionals using the social sharing buttons below.
Redgate sql prompt insert expand columns code#
If you’re not a SQL Prompt user, download a free trial and see how much more productive you can be writing code every day. Take a look and you’ll find handy tricks from other Data Platform MVPs and SQL Server experts help you write SQL more quickly and accurately:
Redgate sql prompt insert expand columns series#
I cover the column picker functionality and more in the new series of #SuperSQLTips videos. I’d encourage you to try this out the next time you’re writing a query with a number of joins and a large number of columns in the tables. This is another way in which SQL Prompt can really speed up your coding. If you’ve got wide tables, with lots of columns, this is a quick way to easily get a few columns into your query without removing your hands from the keyboard. When I type TAB, only those items selected will appear. Now I have just the columns I need added to the query.
![redgate sql prompt insert expand columns redgate sql prompt insert expand columns](https://i.stack.imgur.com/iy5dc.png)
The main features are: A detailed dashboard updating in 15-second intervals, displaying CPU, memory, disk usage, reads and writes, and database wait times. Using the down arrow, I can move through the columns and use the spacebar to check or uncheck them, as I’ve done below: Redgate SQL Monitor is a query optimization tool that features customizable alerts, custom reporting, and a dashboard for monitoring SQL performance. Now I can specifically get a few columns by checking them. Notice the tool tip at the bottom CTRL+Left Arrow will give me the column picker. While I can certainly hit TAB to get Title, I may want more fields. Rather than get all fields from all tables, I can remove the * and start typing a character. SQL Prompt can help me fix this with the column picker. That results in more columns than can even fit on a screen: Or they’ll drag all the columns from the Object Explorer over and use them in this query. I can see this if I use the Expand Wildcards feature of SQL Prompt, which is what some people will do. There are a lot of fields in these tables, and most aren’t used. This is poor practice because it takes more time to complete for clients, it’s an unnecessary use of resources on the client, server and network, and it can fill the buffer cache with rarely-used data.įor example, if someone wants the title of a document and the product it goes with, I’ll see queries like this: SQL Prompt Core is a free extension for Visual Studio Enterprise, which improves your productivity with advanced IntelliSense-style SQL code completion.
![redgate sql prompt insert expand columns redgate sql prompt insert expand columns](https://origin2.cdn.componentsource.com/sites/default/files/styles/carousel_main/public/images/product_screenshot/red-gate/red-gate-sql-prompt-bundle/img_460722.png)
One of the poor practices that I see so many people doing in code is using SELECT *.