English 中文(简体)
How to edit one specific row in Microsoft SQL Server Management Studio 2008?
原标题:

In Microsoft SQL Server Management Studio 2008, is there a secret to be able to edit one row based on a key?

There s an option to do "Edit Top 200 Rows", but what if I want to select some other row and edit it in the datagrid? I would rather do that than code an update statement and risk messing up the where clause.

最佳回答

Use the "Edit top 200" option, then click on "Show SQL panel", modify your query with your WHERE clause, and execute the query. You ll be able to edit the results.

问题回答

How to edit one specific row/tuple in Server Management Studio 2008/2012/2014/2016

Step 1: Right button mouse > Select "Edit Top 200 Rows"

Edit top 200 rows

Step 2: Navigate to Query Designer > Pane > SQL (Shortcut: Ctrl+3)

Navigate to Query Designer > Pane > SQL

Step 3: Modify the query

Modify the query

Step 4: Right button mouse > Select "Execute SQL" (Shortcut: Ctrl+R)

enter image description here

The menu location seems to have changed to:

Query Designer --> Pane --> SQL

If you are facing challenges in saving data from the results pane after using Edit Top 200 Rows option, then the below steps are for you:

  1. Run the query or view that has the data you want to edit.
  2. Navigate to the cells containing the data you want to change.
  3. Type in the new data.
  4. Save your changes by leaving the row.

Ref: MS Docs





相关问题
Performance impact of indexed view in MS SQL Server 2008

Does anyone have experience with using indexed view in MS SQL Server 2008? I am trying to find out how does indexed view affect performance of insert / update statements, that are adding / updating ...

Lock Escalation - What s happening here?

While altering a table (removing a column) in SQL Server 2008, I clicked the Generate Change Script button and I noticed that the change script it generated drops the column, says "go" and then runs ...

Round to nearest 5 in SQL Server

I have a Money column in my SQL Server 2008 table. In my below query how can I round it to nearest 5$ select FineAmount from tickets Thanks

热门标签