January 19, 2009 at 2:04 pm
in SQL server management studio, how can I edit a table's contents?
i can see the databases and the tables and the columns and so on on the object explorer, but I cant find how to view the table contents in the details pane without writing a query
January 19, 2009 at 2:13 pm
Right Click on the table and choose the option Open Table
-Roy
January 19, 2009 at 2:15 pm
You can try right-clicking on one, then using open Table. That will allow you to browse the table.
Still - using this method to go in and edit values is not something I would do much.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
January 19, 2009 at 2:26 pm
right-clicking the table brings up a menu, but open table is not one of the options there
January 19, 2009 at 2:54 pm
Or in T-SQL:
USE 'Database-name'
GO
SELECT * FROM 'your-table-name'
January 20, 2009 at 1:42 pm
Im using SQL server management studio 2008, there is no open table option on the right click menu and I dont want to write a Query, I know I can do that but is there a way to view/edit the contents of a table without writing a SELECT statement?
January 20, 2009 at 1:47 pm
ryp (1/20/2009)
Im using SQL server management studio 2008, there is no open table option on the right click menu and I dont want to write a Query, I know I can do that but is there a way to view/edit the contents of a table without writing a SELECT statement?
Why do you want to do this? There are known issues with using SSMS to edit data - there were issues in 2000 and 2005 and they continued in 2008.
In 2008 - the Open Table option has been removed and replaced with two other options. You should have an option to Edit - which by default will allow you to edit the top 200 rows. Once you have 'opened' the table using this option, you can modify the code to find the rows you are interested in and edit them.
Jeffrey Williams
“We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”
― Charles R. Swindoll
How to post questions to get better answers faster
Managing Transaction Logs
January 20, 2009 at 10:59 pm
I dont really need to do this, but it bugged me that I could not. Your response was good and now I am satisfied, thank you
January 20, 2009 at 11:10 pm
ryp (1/19/2009)
in SQL server management studio, how can I edit a table's contents?i can see the databases and the tables and the columns and so on on the object explorer, but I cant find how to view the table contents in the details pane without writing a query
SQL Server 2005's Open Table function is replaced by "Edit Top 200 Rows". You can change that command in the Tools > Options > SQL Server Object Explorer > Commands.
But once you right-click a table, choose "Edit Top 200 Rows", hunt on the toolbar for a button called "Show SQL Pane". From here you can edit the query so the grid shows a subset of the data that you want.
They did this because people were accidentally opening huge tables with the old Open Table command. This method seems to work pretty well, though in general I find that the 2008 version is pretty wonky when talking to 2005 databases, but that's another matter....
kshitij kumar
kshitij@krayknot.com
www.krayknot.com
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply