Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
pandalion
Starting Member
6 Posts |
Posted - 2014-12-19 : 10:24:28
|
I want a shortcut to paste some SQL wherever my cursor is.For example, I often need to describe a table. On Oracle and Netezza this is easy with desc and /d commands. But in SQL Server you have to type exec sp_columns table_name. And to search for a table I have to type: select table_name from information_schema.tables where table_name like '%%'.This is all too much work, and I'm certainly not browsing the tree structure using my mouse. That's unproductive.I want the ability to hit couple of keys and have code inserted wherever my cursor is. For example I want to hit command keys and have it paste a template where I can quickly just type in the dynamic part.Example: If i want to describe a table I just use short-cut keys and the text "exec sp_columns " is pasted wherever my cursor is and then I type the table name in manually.Any way to do this in SQL Server or Windows? I connect to SQL Server over Citrix if that matters.Thanks! |
|
gbritton
Master Smack Fu Yak Hacker
2780 Posts |
Posted - 2014-12-19 : 11:15:38
|
In SSMS, you can use snippets. see under Tools menu. Ctrl-K Ctrl-X lets you insert snippets. |
|
|
|
|
|