September 30, 2009

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!


Did you like this post?
kick it on DotNetKicks.com
subscribe via rss subscribe via e-mail
print this post follow me on twitter


About The Author

Suprotim Agarwal, ASP.NET Architecture MVP works as an Architect Consultant and provides consultancy on how to design and develop Web applications.

Suprotim is also the founder and primary contributor to DevCurry, DotNetCurry and SQLServerCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal

 
  Feedback:

comments

1 Response to "Using SSMS to change the Edit TOP Rows option"
  1. Greg said...
    October 2, 2009 at 3:31 AM

    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'?

 

Copyright © 2009-2014 All Rights Reserved for SQLServerCurry.com by Suprotim Agarwal | Terms and Conditions