How can I program a keyboard shortcut to select top 1000* from selected table?

心已入冬 提交于 2019-12-10 15:05:42

问题


Is there a way to create a keyboard shortcut in ssms 2012 that when pressed will have the same effect as select top 1000 * from mytable ?

I have explored this already: http://msdn.microsoft.com/en-us/library/ms174178.

Often times when exploring a database very frequently the programmer needs to select top records from tables.

If this is not customizable in ssms, I would be happy with a c# solution,


回答1:


Tools -> Options, then Environment -> Keyboard -> Query Shortcuts. Assign a key to be:

select top 1000 * from 

Notice no table name. Now press OK, and open a new query window. Highlight a table name and then hit your key combo.



来源:https://stackoverflow.com/questions/14900981/how-can-i-program-a-keyboard-shortcut-to-select-top-1000-from-selected-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!