Search code examples
sqlsql-serverssms

Record query while update record in table row in SQL Server Management Studio


I have the following question: In SSMS when I click on Edit Top 200 Rows in the Query Pane and I update one record directly in the result View Pane in the SQL Pane I have the Query for selecting the table, but can I record the query(snapshot of the query) when I edit a row in the table (the UPDATE query)?

I want to catch the SQL code for updating certain values in table rows, but don't know how to do it.

Thanks!


Solution

  • SSMS doesn't offer you a "script this action" in the Edit N Rows dialog like it does for many other types of dialogs. You can perform the action while capturing it in a variety of ways: