How to quickly edit values in table in SQL Server Management Studio?

一曲冷凌霜 提交于 2019-11-26 18:01:50

问题


Aside from context menu -> "Edit Top 200 Rows" from Object Explorer, is there a quick way to open a table in Edit mode where I can just quickly modify the value of a cell?

I need to be able to page past the first 200 rows. And I dont want to write "insert" script for every minor tweak I need to do... I don't understand why SMS doesn't offer quick access to a paged table editor (like Navicat).


回答1:


In Mgmt Studio, when you are editing the top 200, you can view the SQL pane - either by right clicking in the grid and choosing Pane->SQL or by the button in the upper left. This will allow you to write a custom query to drill down to the row(s) you want to edit.

But ultimately mgmt studio isn't a data entry/update tool which is why this is a little cumbersome.




回答2:


Go to Tools > Options. In the tree on the left, select SQL Server Object Explorer. Set the option "Value for Edit Top Rows command" to 0. It'll now allow you to view and edit the entire table from the context menu.




回答3:


If you are on Azure you need you can now, you need to have Manag. Studio 2014 and update hotfix: http://blogs.msdn.com/b/sqlreleaseservices/archive/2014/12/18/sql-server-2014-management-studio-updated-support-for-the-latest-azure-sql-database-update-v12-preview.aspx

File: http://hotfixv4.microsoft.com/SQL%20Server%202014/nosp/SQLServer2014_RTM_CU5_3011055_12_0_2456_/12.0.2456.0/free/480863_intl_x64_zip.exe




回答4:


Brendan is correct. You can edit the Select command to edit a filtered list of records. For instance "WHERE dept_no = 200".



来源:https://stackoverflow.com/questions/1535469/how-to-quickly-edit-values-in-table-in-sql-server-management-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!