August 24, 2012 at 9:01 am
I ran script as below in query window but come out read only.
How to make it editable in result window?
select * from order
August 24, 2012 at 9:19 am
Are you trying to edit data in Management Studio? Or some other application?
If Management Studio, right-click the table and choose Edit Top 200 Rows. You can view the underlying query and add a Where clause to it if you need something other than the top 200.
Generally, though, edits to data should be done through T-SQL commands, either scripts or stored procedures, using Update or Merge statements.
The Management Studio data editor uses a cursor, if I remember correctly, and those can get very aggressive on locking data, so it's not recommended that you use it on a production database while it's in use. Simple Update statements will usually be less aggressive about locking.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
August 24, 2012 at 9:22 am
Thank you for help.
I did the way you are showing but it is not convenient.
Every time I need to modify it.
August 24, 2012 at 12:12 pm
adonetok (8/24/2012)
Thank you for help.I did the way you are showing but it is not convenient.
Every time I need to modify it.
Well SSMS is not designed to be a data editor. You really should be using update statements instead. Keep in mind that SSMS is just a client application that connects to sql server just like any application you might write.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply