开发者

Refreshing a table in SQL server management studio

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开发者_C百科 this?


In SSMS (SQL Server Management Studio) press Ctrl + R

In Visual Studio Press Shift + Alt + R


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.


As a rule, manually editing data in SQL Server is a bad practice.

  • It's not repeatable. Anything you do is limited to your window and once it's gone it's gone.
  • It's easy to make mistakes. Click the wrong cell, fat-finger a decimal point, etc.

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.


It is much easier if you just create a query referencing on that table. Then create select statement giving all rows from that table.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜