Using SSMS to change the Edit TOP Rows option

SQL Server 2008 Management Studio has an option to Edit the Top 200 Rows. Just Right Click on the Table and you get the following options:

image

If your table contains many columns, opening 200 rows to edit them would be slow to execute. However not many know that this number can changed using a simple setting.

So let us say we want to edit only the TOP 5 Rows. A quick way to do this would be to go to Tools > Options > SQL Server Object Explorer and change the ‘Value of Edit Top <n> Rows Command to 5

Now when you Right Click the Table, you see the option to Edit only TOP 5 rows

image

A very simple tip, but known to many!

1 comment:

  1. Thanks for this tip. I never knew the option could be changed.

    Is there any way I can use this option to return TOP rows based on a condition. For eg: Return TOP 5 Rows where x='some value'?

    ReplyDelete