如何在 Oracle SQL Developer 中编译 SQL?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5068962/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 22:49:45  来源:igfitidea点击:

How to compile SQL in Oracle SQL Developer?

sqloracleoracle-sqldeveloperora-00942

提问by IAdapter

I have a SQL query that has error.

我有一个有错误的 SQL 查询。

When I execute it i get ORA-00942: Table or view does not exist.

当我执行它时,我得到 ORA-00942: Table or view does not exist.

I don't know which table is giving me the error.

我不知道哪个表给了我错误。

I do know that some SQL Editors offer compilation of SQL and highlight the part that has error. is it possible in oracle sql developer?

我知道一些 SQL 编辑器提供 SQL 编译并突出显示有错误的部分。在oracle sql developer中可以吗?

回答by Sathyajith Bhat

Try the ye ol' Oracle SQL*Plus

试试你的 Oracle SQL*Plus

SQL> select * from dasd
  2  union 
  3  select 1 from dual
  4  /
select * from dasd
              *
ERROR at line 1:
ORA-00942: table or view does not exist


If you want to know if it's possible in SQL developer - it depends. If it's a stored procedure, double-clicking on the error message in the Log -> Compiler messages should show the approximate location of the error. If you're running in SQL Worksheet, then unfortunately, it's not possible.

如果您想知道在 SQL 开发人员中是否可行 - 这取决于。如果它是一个存储过程,双击 Log -> Compiler messages 中的错误消息应该会显示错误的大概位置。如果您在 SQL Worksheet 中运行,那么不幸的是,这是不可能的。