请使用 SQl Developer 单一查询结果选项卡
在免费应用程序 SQL-Developer(由 Oracle 提供)中,我尝试四处寻找此问题,但无法立即找到解决方案。我发现打开多个 SQL 查询结果窗口/选项卡有点烦人。我确信此功能有非常有用的案例,但我的问题是: 我们能否将多个查询结果窗口变成只有一个(Toad 风格)。如果有一个快捷键,那就太棒了。
In the free application SQL-Developer (provided by Oracle), I tried searching around for this but couldn't immediately find a solution. I find the opening of multiple SQL query result window/tabs mildly annoying. I'm sure there are very useful cases for this feature, but my question is:
Can we turn the multiple query result windows to just one (Toad style). If there's a shortcut key for this, that would be super awesome.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
SQL Developer 4.0 (2013)
关闭所有查询结果选项卡
工具 >偏好设置
数据库>工作表>取消选中“在新选项卡中显示查询结果”
SQL Developer 4.0 (2013)
Close all the Query Result tabs
Tools > Preferences
Database > Worksheet > uncheck "Show query results in new tabs"
所以,事实证明这是一个错误。如果仔细观察,您会注意到,对于每个查询运行,结果选项卡都会自动固定,导致每个新查询运行都需要它自己的新选项卡来显示结果。
仅当您明确进入“工具”->“首选项”->“数据库”->“工作表”->“自动冻结结果选项卡”时,才应启用自动固定。
这是一个已识别的错误,Oracle 使用 SQL Developer 2.1.1 修复了该错误。
访问 oracle.com 并下载最新版本,这个问题就会消失。这绝对是非常烦人的。
So, it turns out this is a bug. If you look closely, you'll notice that for each query run, your results tab is automatically being pinned, causing each new query run to need it's own new tab to display the results.
The automatic pinning is only supposed to be enabled when you explicitly go into Tools->Preferences->Database->Worksheet->"Automatically Freeze Result Tabs".
It is an identified bug, that Oracle fixed with SQL Developer 2.1.1.
Go to oracle.com and download the latest version and this should go away. It was definitely very annoying.
单击“运行脚本”(F5),而不是“运行语句”。这将在同一查询结果窗口中给出两个查询的输出。
Instead of "Run Statement" click on "Run Script"(F5). This would give the output of two queries in the same Query Result window.
直接到数据库还是从应用程序?您的意思是从多个表一起返回一个结果集还是在一个窗格中返回多个结果集?您使用的是 SQL 2000、2005、2008 还是其他版本?这个问题措辞含糊,但无论如何我都会尽力提供帮助。
出于本答案的目的,我认为您正在尝试直接查询数据库。打开 SQL Server Management Studio 2005 或更高版本(不确定这在 2000 中是否有效),单击“新建查询”,然后在窗格中键入多个查询。即:
将在同一窗口/窗格中返回两个结果集。
Directly to the database or from an application? Do you mean returning one result set from multiple tables together or multiple result sets in one pane? Are you using SQL 2000, 2005, 2008, or something else? The question is vaguely worded, but I'll try to help anyway.
For the purposes of this answer, I think you're trying to query the database directly. Open SQL Server Management Studio 2005 or newer (Not sure if this works in 2000), click New Query, and type the multiple queries into the pane. i.e.:
will return two result sets in the same window/pane.
取消固定有助于保留当前选项卡以供下一个查询。
(我使用的是 Oracle SQL Developer 22.x)
Unpin helps keep current tab for next query.
(I am using Oracle SQL Developer 22.x)
我发现这种情况发生在 SQL Dev v4.0.2.15 中,因为我运行了 2 个 SELECT 语句。一次运行一个 SELECT 会重新使用“结果”选项卡。
I found that this was happening in SQL Dev v4.0.2.15 because I was running 2 SELECT statements. Running one SELECT at a time re-used the Results tab.