如何验证我的PL / SQL语法 [英] How I can verify my PL/SQL syntax

查看:171
本文介绍了如何验证我的PL / SQL语法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对不起,我的英语不好。我希望你能得到我想要的。



我有很多* .sql文件,我想写一个程序来编译它们,如果有任何问题通知我(问题或错误)。



我的一个朋友为java写了一个IDE,因为我记得他使用javac生成错误代码。另一方面,我看到IDEs Visual Studio或Netbean告诉你自动是否有错误。所以现在我想知道任何一个人有任何想法如何可以做到这一点与sql文件?



换句话说,我想写一个编辑器的SQL文件(PL / SQL)编译我的代码,告诉我是什么是我的错误。



当我试图在SQL PLUS中编译所有这些问题,这是很无聊。 / p>

请帮助我...

解决方案

SQL * Plus在命令行上运行。因此,您可以以类似于您的朋友使用javac的方式使用它。

 > sqlplus username / password @ connection_identifier @ scriptToExecute.sql 

请记住,您的操作可能会有后果,想要实现sql的回滚,也许可以临时命名ddl / dml命令。



或者,下载Oracle的免费 SQL Developer 工具。


Sorry my English is bad. I hope you can get what I want.

I have lots of *.sql files that I want to write a program to compile them and inform me if there is any issues (problems or mistakes).

One of my friends writes an IDE for java, as I remember he use javac to generate the error codes. On the other hand I've seen the IDEs Visual Studio or Netbean tell you automatically if there are errors. So now I want to know any one has any idea how you can do that with sql files?

In other words I want to write an Editor for SQL files(PL/SQL) that compile my code and tell me what is my error.

This problem raise up when I try to compile all of them in SQL PLUS, it's so boring.

Please help me...

解决方案

SQL*Plus can be run on the command line. Therefore you can use it in a manner similar to your friend's use of javac.

> sqlplus username/password@connection_identifier @scriptToExecute.sql

Remember that your actions can have consequences, so you will want to implement rollback for sql and perhaps temporary naming for ddl/dml commands.

Or alternatively, download Oracle's free SQL Developer tool that already does all that.

这篇关于如何验证我的PL / SQL语法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆