问题
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