views:

222

answers:

3

I am using SQL server management studio (2008) quite a lot these days. If it had a "Select top 1000" command in the toolbar,(or a shortcut key) it would make my life a lot easier. Is there any way i can do it. I tried looking in the customize dialog, but cant find that command there.

A: 

SQUirreL, a cross-platform SQL client/database browser, has a checkbox for this (which defaults to "top 100).

tpdi
A: 

Tools, Options, Query Execution, General, SET ROWCOUNT. The default is zero = no limits.

SET ROWCOUNT is environment specific for all queries. SELECT TOP is per query.

gbn
+1  A: 

The steps are as follows:

  • Navigate to Tools, Options, Environment, Keyboard
  • Choose one of the query shortcuts not in use
  • Where it says 'Stored Procedure' enter:

select top 1000 * from

  • You'll have to open a new query window for the shortcut changes to take affect
  • Press your shortcut when selecting a table name