且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在SQL Server Management Studio中编辑多个行/数据条目

更新时间:2023-02-03 23:16:02

如果选择 编辑前200名,则直接将其插入表中行 ,您可以先修改查询以返回250行。

If you select Edit Top 200 Rows first, you can then modify your query to return 250 rows.

为此,您需要点击 显示SQL窗格 按钮,位于左上角, 新查询 按钮正下方。

In order to do this you need to click on Show SQL Pane button, in the top left corner, just below the New Query button.

在查询窗口中,将 200 更改为 250 ,然后按Ctrl + R刷新。

In your query window change 200 to 250 and hit Ctrl + R to refresh.

但是,如果您确实需要更新此行数,则可能应该使用原始SQL并编写正确的UPDATE语句。

However, if you really need to update this number of rows, you should probably use raw SQL and write proper UPDATE statements.

编辑:

在您描述的情况下,我通常会创建单个 UPDATE 语句,然后复制全部内容以在SQL中执行:

In the situation you described, I normally create individual UPDATE statements within Excel and then copy the whole lot to execute in SQL: