How to change ‘Edit Top 200 Rows’ and ‘Select Top 1000 Rows’ in SQL

By FoxLearn 12/24/2024 8:18:49 AM   12
In SQL Server Management Studio (SSMS), when you right-click on a table, you can use the context menu to quickly run commands like Select Top 1000 Rows or Edit Top 200 Rows.

Fortunately, SSMS allows you to customize this default number to better suit your requirements.

To adjust the default row limit for the Select Top n Rows and Edit Top n Rows commands in SSMS:

In SSMS, go to the Tools menu in the top menu bar.

sql tool menu

From the dropdown menu, select Options....

In the Options dialog that appears, expand the SQL Server Object Explorer node on the left side.

ssms

Click on Commands under SQL Server Object Explorer.

  • In the Table and View Options section, you will see two settings:

    • Value for Edit Top <n> Rows command: The default value is 200.
    • Value for Select Top <n> Rows command: The default value is 1000.
  • Change the values in these fields according to your needs:

    • For example, if you want both commands to return 1000 rows, change the Value for Edit Top <n> Rows to 1000.
    • You can adjust these values to any number, including 0. Setting a value of 0 will return all rows when using the Select Top or Edit Top commands, so be cautious with this setting as it may impact performance on large tables.

Once you've made the necessary adjustments, click OK to save the changes and close the Options dialog.