SQL 2008 Select Top 1000 and update the selected database drop-down

Posted by CWinKY on Stack Overflow See other posts from Stack Overflow or by CWinKY
Published on 2010-06-06T20:03:10Z Indexed on 2010/06/06 20:12 UTC
Read the original article Hit count: 280

When you right click and do a Select top 1000 rows from a table in sql 2008, it opens a tab and writes the sql and then executes it. This is okay, however I'll erase the sql and use the same tab often to do other sql statements. What annoys me is that I have to go to the database drop-down at the top of the window and change it to the current database I'm in because it says Master.

How can I make sql 2008 update the selected database for this tab automatically when I right click a table and do select top 1000?

On a side note, can I automatically hide the select statement that it generates and just show grid of results?

© Stack Overflow or respective owner

Related posts about sql-server-2008

Related posts about management-studio