I want to know if it is possible to change the ordering of the results when you right click a table in SSMS and select "edit top 'n' rows".
I have noticed it defaults the 'order by' to the first column.
Unfortunately I am manually updating records and it would save many hours if i could re order it to a column which maps directly to my Excel spreadsheet.
NOTE: I know how to change the number of rows I can edit (hence the reason i have used 'n' instead of the default: 200).
I just want to know if it is possible, perhaps from someone who knows the internals of it. I was hoping there is some script it executes and I could edit that script ?
Thanks in advance
By right-clicking on the table name I select the command "Edit Top 200 Rows". By the way, the number of rows loaded with this command can be changed by the option "Tools > Options > SQL Server Object Explorer > Commands > Value for Edit top <n> Rows command". If 0 is entered, all rows or options are loaded.
You can change the order of the rows by adding an ORDER BY clause at the end of your query, with a column name after. By default, the ordering will be in "ascending order", from lowest value to highest value. To change that to "descending order", specify DESC after the column name.
By default in SSMS, you can select 1000 Rows and Edit 200 Rows. If you would like to change the default value then go to SSMS > Tools > Options: In the Options dialog box, highlight SQL Server Object Explorer and change the default values to any number as per your requirements.
Using SQL Server Management StudioIn Object Explorer, right-click the table with columns you want to reorder and select Design. Select the box to the left of the column name that you want to reorder. Drag the column to another location within the table.
You can right click on your result and select pane\SQL
and then change your order and top amount of your query.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With