How to alter SQL in “Edit Top 200 Rows” in SSMS 2008

后端 未结 8 1103
挽巷
挽巷 2020-12-22 17:54

In SQL Server 2008 Management Studio, when I right click on a database table and choose \"Select Top 100 Rows\", I can then e.g. easily add a \"ORDER BY \"

相关标签:
8条回答
  • 2020-12-22 18:06

    enter image description here

    Follow the above image to edit rows from 200 to 100,000 Rows

    0 讨论(0)
  • 2020-12-22 18:14

    Ctrl+3 in SQL Server 2012. Might work in 2008 too

    0 讨论(0)
  • 2020-12-22 18:16

    Similar to David Hall's response, if you are a non-coder, it may be easiest to right-click within results, then choose Pane > Criteria. This allows you to adjust sort, add filters, etc... without adjusting SQL code.

    0 讨论(0)
  • 2020-12-22 18:19

    Very quick and easy visual instructions to change this (and the select top 1000) for 2008 R2 through SSMS GUI

    http://bradmarsh.net/index.php/2008/04/21/sql-2008-change-edit-top-200-rows/

    Summary:

    • Go to Tools menu -> Options -> SQL Server Object Explorer
    • Expand SQL Server Object Explorer
    • Choose 'Commands'
    • For 'Value for Edit Top Rows' command, specify '0' to edit all rows
    0 讨论(0)
  • 2020-12-22 18:25

    You can also change the pop-up options themselves, to be more convenient for your normal use. Summary:

    1. Run the SQL Management Studio Express 2008
    2. Click the Tools -> Options
    3. Select SQL Server Object Explorer . Now you should be able to see the options

      • Value for Edit Top Rows Command
      • Value for Select Top Rows Command
    4. Give the Values 0 here to select/ Edit all the Records

    Full Instructions with screenshots are here: http://m-elshazly.blogspot.com/2011/01/sql-server-2008-change-edit-top-200.html

    0 讨论(0)
  • 2020-12-22 18:26

    If you right click on any result of "Edit Top 200 Rows" query in SSMS you will see the option "Pane -> SQL". It then shows the SQL Query that was run, which you can edit as you wish.

    In SMSS 2012 and 2008, you can use Ctrl+3 to quickly get there.

    0 讨论(0)
提交回复
热议问题