If you use SQL Server Management Studio often, you will have noticed that from the context menu that is displayed when right clicking on a table, there are two options (among the others) namely “Select Top 1000 Rows” and “Edit Top 1000 Rows”. The purpose of these menu options are self evident. But wouldn’t you like to be able to select or edit all the rows in a table? Well the good news is that you can by following these steps:
- Click on Tools in the menu, and then Options.
- Select SQL Server Object Explorer. From the options on the right hand side, you should be able to see the following:
- Value for Edit Top <n>Rows Command
- Value for Select Top <n> Rows Command
You can obviously change the values for each as you wish (for example 2000 for select top 2000 rows), but if you would like to select and edit all the rows, change these values to 0.
Now if you go back into SQL Server Management Studio and right click on a table, you will see that the Context Menu options have changed to “Select All Rows” and “Edit All Rows”.
If you have some nice SQL Server tips that you would like to share, please let us know by leaving a comment in the section below.
[Original Post by Senthil Kumar]