To refresh the IntelliSense cache use the Edit menu then IntelliSense and Refresh Local Cache. This is because the local IntelliSense cache needs to be refreshed. Refresh the IntelliSense cache for new objects – Sometimes when you first create a table or a stored procedure it won’t have any IntelliSense displayed for it.Using GO X to execute T-SQL batches multiple times – Everyone knows you use the GO command to mark the end of a T-SQL batch and send it to SQL Server to be executed but did you know if you specify a number after the GO command it will cause the batch to be run the specified number of times? You can use this to repeat insert and update statements for creating test data and other commands to you want to run multiple times.For example, you might want to cut all of the schema references for a given tables T-SQL code. Using ALT + select can be particularly useful for deleting a block of text. If you hold down the ALT key you can select columns and vertical regions as well as by lines. Select blocks of text using the ALT Key – Normally, when you select text with the mouse the Query Editors selects it in horizontal blocks.In the Options dialog expand Text Editor and then select Transact-SQL and check the Line numbers box. To enable the display of line numbers use the Tools menu and select Options. Displaying line numbers for large queries – When you’re working with large queries it can be useful to display line numbers on the query window.However, if you use the New Vertical Tab Group option from the SSMS Window menu you’ll be able display the contents of the different tabs vertically enabling you to much more easily compare the code and the query results. Comparing queries and results using New Vertical Tab Group – The default layout of Query Editors tabbed windows makes it difficult to compare the T-SQL code and results that are in different windows.Right clicking will display a context menu where you can select the Script As option. The Object Explorer Details window will show all of the available objects allowing you to select multiple objects. Now use Object Explorer to expand a database then navigate to one of the nodes like Tables, Stored Procedure or Views. To script multiple objects you need to use the View menu to open the Object Explorer Details window. But not everyone realizes that you can also script multiple object at once. Script multiple objects by using the Object Explorer Details - Scripting objects like tables and stored procedures is one of the handiest features in SSMS.CTRL + I – Display the incremental search dialog.CTRL + SHIFT + Q– Display the query designer.CTRL + L - Display the query execution plan.F5, CTRL + E or ALT + X - Execute the currently selected code.SSMS provides the following built-in keyboard shortcuts that you’ll find handy. Speed up your editing using keyboard shortcuts – Taking advantage of keyboard shortcut can make your work faster and more efficient.Both parts of the split window can be scrolled and edited independently. Splitting the query window can be useful if you have a large query and want to view or work on different sections of the same query. Split the Query window to more efficiently work on large queries – It’s not immediately obvious but the SSMS Query Editor window can be split in two, enabling you to see two different sections of the same query simultaneously.The server connection information is stored in an XML file and the server will be displayed in the Registered Servers window the next time you open SSMS. The new server will appear under Local Server Groups. Enter the server connection information and close the window. Expand the Database Engine node, then right click on the Local Server Groups folder and select New Server Registration. To add a registered server open the Registered Servers window from the View menu or press CTRL + ALT + G. SSMS Registered Servers enable these details to be entered just once and reused every time you open up SSMS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |