Shortcut: Change the number of rows selected or edited in Object Explorer in SSMS

When you right-click a table in SQL Server Management Studio, you get options for selecting or editing but the number of rows is limited:

Those values can be changed. By default, these numbers are both 200, but I've decided to change the default number of rows selected to 1000.

In Tools, Options, SQL Server Object Explorer, then Commands, you can set the values to whatever suits you:

I don't tend to ever use the Edit option but I'd suggest not making it too large.

2 thoughts on “Shortcut: Change the number of rows selected or edited in Object Explorer in SSMS”

  1. Hi,
    to get the underlying SQL script from the Edit nnn rows you can do the following:
    After executing "EDIT Top n" – in the table displayed use right mouse button "Pane" – that opens another submenu with
    "Diagram" – The underlying table as image
    "Criteria" – The columns of the checkbox option (handy, tick changes the SQL statement)
    "SQL" – The associated SQL script
    "Results" – hide / show the editable table
    After changing the SQL statement, you have to re-execute the right mouse button – Execute SQL – because the "Execute" button (from the Edit menu) at the top of the menu bar remains greyed out.
    In this way you also can edit the SQL statement with "EDIT TOP n".
    Shortcut – "Show SQL" 3 – "Execute SQL" R
    mfg Klaus Obd

    1. That's interesting Klaus. I have to admit that I never use the Edit menu option. I'd rather just run T-SQL statements when editing data. Also have been concerned about how it does locking, etc. in the past.

Leave a Reply

Your email address will not be published.