views:

350

answers:

2

In Microsoft SQL Server Management Studio 2008 - is there not a secret to being 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 data-grid? I would rather do that than code an update statement and risk messing up the where clause.

Is there some secret option to switch the query view into an edit view? Wouldn't the designers of this tool thought of that? Maybe it's there and I'm just unaware of it.

Thanks,

Neal Walters

A: 

Writing a SELECT statement that selects from the given table a specific row will show it in the grid & you should be able to edit it.

e.g.

SELECT *
FROM myBigTable
WHERE ID = someIdIWantToEdit
shahkalpesh
If you just do a file new query, code a select, the resulting grid is not editable.
NealWalters
@NealWalters: How is it different from the reply by @Nestor?
shahkalpesh
+3  A: 

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

Nestor
Perfect - Thanks!
NealWalters

related questions