如何更改“编辑前 200 行”中的 SQL在SSMS 2008
在 SQL Server 2008 Management Studio 中,当我右键单击数据库表并选择选择前 100 行时,我可以轻松地将 ORDER BY
语句添加到 SQL。效果很好。
但是,当我选择编辑前 200 行时,我无法更改 SQL(这使得很难查找和编辑刚刚添加到那里的 10,000 条记录中。
我非常确定我能够在 SQL Server 2000 中执行此操作。
在 SMSS 2008 中是否有任何方法可以更改编辑记录时记录的显示方式?
In SQL Server 2008 Management Studio, when I right click on a database table and choose Select Top 100 Rows, I can then e.g. easily add a ORDER BY
statement to the SQL. That works fine.
But when I do choose Edit Top 200 Rows, I don't have the ability to alter the SQL (which makes it hard to find and edit a record just added in the 10,000 that are there.
I am quite sure I was able to do this in SQL Server 2000.
Is there any way in SMSS 2008 to alter the way the records are displayed when editing records?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
如果右键单击 SSMS 中“编辑前 200 行”查询的任何结果,您将看到选项“窗格 -> SQL”。然后它会显示已运行的 SQL 查询,您可以根据需要对其进行编辑。
它是下图中的 SQL 按钮:
在 SMSS 2012 和 2008 中,您可以使用 Ctrl+3 快速到达那里。
If you right click on any result of "Edit Top 200 Rows" query in SSMS you will see the option "Pane -> SQL". It then shows the SQL Query that was run, which you can edit as you wish.
It's the SQL button on the following image:
In SMSS 2012 and 2008, you can use Ctrl+3 to quickly get there.
您还可以更改弹出选项本身,以更方便您的正常使用。摘要:
选择 SQL Server 对象资源管理器。现在您应该能够看到选项
在此处给出值 0 以选择/编辑所有记录
完整说明位于:http://m-elshazly.blogspot.com/2011/01/sql-server-2008-change-edit-top-200.html
You can also change the pop-up options themselves, to be more convenient for your normal use. Summary:
Select SQL Server Object Explorer . Now you should be able to see the options
Give the Values 0 here to select/ Edit all the Records
Full Instructions with screenshots are here: http://m-elshazly.blogspot.com/2011/01/sql-server-2008-change-edit-top-200.html
通过 SSMS GUI 非常快速和简单的视觉说明来更改 2008 R2 的此项(以及选择前 1000 个)
http://bradmarsh.net/index.php/2008 /04/21/sql-2008-change-edit-top-200-rows/
摘要:
Very quick and easy visual instructions to change this (and the select top 1000) for 2008 R2 through SSMS GUI
http://bradmarsh.net/index.php/2008/04/21/sql-2008-change-edit-top-200-rows/
Summary:
按照上图编辑 200 到 100,000 行的行
Follow the above image to edit rows from 200 to 100,000 Rows
SQL Server 2012 中的 Ctrl+3。在 2008 年也可能有效
Ctrl+3 in SQL Server 2012. Might work in 2008 too
在 SQL 2017 中,您可以在右侧的工具栏中更轻松地完成此操作,只需点击
SQL 按钮,然后它会显示您编辑的前 200 条查询,直到达到您想要的数量,然后执行查询并完成!只需编辑
in SQL 2017 You can do it more easily in the toolbar to the right just hit
the SQL button then its gonna apear the query with the top 200 you edit until the quantity that You want and Execute the query and Done! just Edit
与 David Hall 的回答类似,如果您不是编码人员,最简单的方法可能是在结果中右键单击,然后选择“窗格”>“窗格”。标准。这允许您调整排序、添加过滤器等,而无需调整 SQL 代码。
Similar to David Hall's response, if you are a non-coder, it may be easiest to right-click within results, then choose Pane > Criteria. This allows you to adjust sort, add filters, etc... without adjusting SQL code.
打开/向表添加行的默认设置是“编辑前 200 行”。如果你有超过 200 行,就像我现在一样,那么你需要更改默认设置。以下是我将编辑默认值更改为 300 所做的操作:
The default to open/add rows to a table is Edit Top 200 Rows. If you have more than 200 rows, like me now, then you need to change the default setting. Here's what I did to change the edit default to 300: