Visually edit records for any query using SQL Management Studio

comments

I watched an interesting thing take place the other day, in the form of someone using the visual tooling in SQL Management Studio to “Edit Top 200 rows” in a table, then realising that the record they wanted was not there, running a manual SELECT query to find the record, and then running a manual UPDATE command to edit the row. This can all be done a lot quicker using the same visual tooling they used in the first action – it’s just sneakily hidden in SQL Management Studio.

Save yourself the hassle

Open Microsoft SQL Management Studio

Connect to your database of choice

Right click on a table and select “Edit Top 200 Rows”

image

In the toolbar there is an icon that says the word “SQL” on it that if you hover over it displays the word “Show SQL Pane”. Click this icon to reveal the SQL script that is being used to show your edit pane.

image

This should now appear

image

Edit your SQL to find the rows you’re looking for and execute the query (either hit F5 or the Exclamation mark in the toolbar).

image

Enjoy easier record editing in SQL Management Studio!