Select menu in SSMs: Tools --Customize , tick "show shortcut keys in ScreenTips" so that when you hover over the execution icon, a prompt F5 is displayed. Shortcut keys do not need to rote, the mouse point when you look at the next time you can use the shortcut keys, with more than cooked.
SQL Server Management Studio supports custom shortcut keys: tools, options, keyboards :
Among them, Alt+f1, ctrl+1, ctrl+2 are predefined shortcut keys for the system.
Double-click the table name (or ctrl-click the table name) to select a table name, such as TableName, press ALT+F1, which is equivalent to performing "sp_help tablename" to view descriptive information about the object.
--CTRL+F1: Displays the first 100 rows of a table or view, and the selected tablename,1000 press CTRL+F1 to display the first 1000 rows of the table.
sp_executesql n ' IF object_id (@tablename) is not NULL EXEC (n "SELECT TOP" [Email protected]+n ' * from ' [email protected] ) ', N ' @tablename nvarchar (+), @n int=100 ',
--ctrl+3: Displays a definition script for views, stored procedures, functions, and triggers.
sp_helptext
--ctrl+4: Displays the number of rows and space for the table.
sp_spaceused
--ctrl+5: Displays the space occupied by each index in the table.
sp_executesql N ' SELECT index_name = Ind.name, Ddps.used_page_count, Ddps.reserved_page_count, Ddps.row_count from sys.indexes ind INNER JOIN sys.dm_db_partition_stats DDPs on ind.object_id = ddps.object_id and ind.index_id = Ddps.index_ ID WHERE ind.object_id = object_id (@tablename) ', N ' @tablename nvarchar ',
--ctrl+9: Displays the field names of the table or view, separated by commas.
sp_executesql N ' Select columns = STUFF ((SELECT ', ' +name from sys.columns WHERE object_id = object_id (@tablename) FO R XML PATH (""), "("), "") ', N ' @tablename nvarchar ',
--ctrl+0: Finds a table, view, stored procedure, function
in the current database based on the selected keyword sp_ ExecuteSQL N ' SELECT * from sys.objects WHERE type A (' U ', ' V ', ' P ', ' FN ') and name like '% ' [email protected]+ '% ' ORDER by Type,name ', N ' @keyword nvarchar ',