Friday, November 26, 2010

Sql Server Management Studio: Select /Edit Top N Rows

Like many useful enhancements in Sql Server Management Studio 2008, "Select Top N Rows" and "Edit Top N Rows" options are added. Now you can execute select (from your desired table)query by just right click on desired table and click "SELECT TOP 1000 ROWS". Or you can edit top 200 number of row by clicking on "SELECT TOP 200 ROWS".


Question arises, How to change default number of rows i.e. 1000 for select and 200 for edit. Simple:

Select TOOLS from your main menu and click OPTIONS, move cursor to SQL SERVER OBJECT EXPLORER


By changing values for "Value for Edit top rows command" or "Value for Select top rows command", to your desired one, will change your default settings.

Keep in mind that setting value 0 (ZERO) for both options mean ALL TABLE ROWS.

3 comments:

  1. Server Management is essential for a business that have Windows or Linux servers that need to be running at all times because your staff relies on them. There are many different types of servers which include file servers, back up servers, application servers, database, and more.

    ReplyDelete
  2. PERFECT! Straight to the point... simple question simple answer.
    Cheers.

    ReplyDelete
  3. Thanks a lot this was very helpful.

    Cheers.
    Balaram

    ReplyDelete

All suggestions are welcome