在 SQL Server Management Studio 中刷新表
我已经在 SQL Server Management Studio Express 中打开了一个表。
我该如何更新它? 由于除非我关闭并重新打开表格,否则不会显示工作室应用程序外部所做的更改。当然必须有更好的方法来做到这一点吗?
I have opened a table in SQL server management studio express.
How do I update it?
As changes made outside the studio application do not show unless I close and reopen the table. Surely there must be a better way of doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
在SSMS (SQL Server Management Studio)中按Ctrl + R
在Visual Studio中按Shift kbd> + Alt + R
In SSMS (SQL Server Management Studio) press Ctrl + R
In Visual Studio Press Shift + Alt + R
我不确定我是否完全理解您想要的内容,但是如果您想查看更改,则必须重新执行加载表的查询。您可以通过单击“执行 SQL”(或从上下文菜单中选择它)来完成此操作。
根据“打开表格”的含义(选择顶部 x 行、编辑顶部 x 行等),您也可以尝试按 F5 (适用于“选择顶部 x 行”) - 其中只是执行前面的语句。
I am not sure if I understand exactly what you want, but if you want to see the changes, the query that loaded the table has to be re-executed. You can do this by clicking on "Execute SQL" (or selecting it from the context menu).
Depending on what you mean with "opening the table" (select top x rows, edit top x rows, etc ) you also might try to hit F5 (works for "Select TOP x Rows") - which simply executes the previous statement.
通常,在 SQL Server 中手动编辑数据是一种不好的做法。
更好的解决方案是创建并保存插入或更新脚本。这些是可编辑、可审阅和可重新运行的。
如果您现在需要重新创建数据库或复制某些内容,则需要手动输入之前输入的所有相同值。如果您将其编写为脚本,则只需运行该脚本,并且可以按
F5
多次获得相同的数据。As a rule, manually editing data in SQL Server is a bad practice.
A much better solution is to create and save insert or update scripts. These are editable, reviewable, and rerunnable.
If you need to recreate your database or replicate something now, you need to manually type in all the same values you typed in before. If you script it out, you just run the script and can have the same data as many times as you can hit
F5
.如果您只创建一个引用该表的查询,那就容易得多。然后创建 select 语句,给出该表中的所有行。
It is much easier if you just create a query referencing on that table. Then create select statement giving all rows from that table.