SQL Plus 和apex.oracle.com的 SQL 语法是否有任何不同?
从这篇文章中我可以假设它没有,但我想确定一下。SQL Plus 只是一个能够连接到 Oracle 服务器的环境吗?
我问这个是因为我刚开始学习 Oracle 的 SQL 语法,而且我无法从家里访问我教师的服务器。到目前为止,我发现的唯一解决方案是 Apex,因为我不打算在我的笔记本电脑上安装服务器。
SQL Plus 和apex.oracle.com的 SQL 语法是否有任何不同?
从这篇文章中我可以假设它没有,但我想确定一下。SQL Plus 只是一个能够连接到 Oracle 服务器的环境吗?
我问这个是因为我刚开始学习 Oracle 的 SQL 语法,而且我无法从家里访问我教师的服务器。到目前为止,我发现的唯一解决方案是 Apex,因为我不打算在我的笔记本电脑上安装服务器。
SQL Plus 只是一个能够连接到 Oracle 服务器的环境吗?
是的,除非您可以连接到 Oracle 数据库服务器,否则 SQL*Plus 并不是很有用。
我问这个是因为我刚开始学习 Oracle 的 SQL 语法,而且我无法从家里访问我教师的服务器。到目前为止,我发现的唯一解决方案是 Apex,因为我不打算在我的笔记本电脑上安装服务器。
如果您无法在家中连接到教师的数据库服务器,您别无选择,只能在某处安装自己的服务器。Apex 仅在 Oracle 数据库服务器上运行。
但是,现在这并不太难,只要您仔细按照安装说明进行操作即可。
另一种选择是在 apex.oracle.com 上获得一个免费帐户。您将能够使用 Apex 的 SQL 界面。不过,我认为您无法使用 SQL Developer 连接到它。
或者,您可以在 Amazon 的 EC2 上启动一个简单的预先准备好的 Apex 实例。使用此选项,如果您打开相关端口 (1521),您将能够使用 SQL Developer 连接到它。
SQL 命令是相同的。它们都直接传递给数据库引擎执行。
SQL*Plus 有一堆额外的命令(主要用于格式化输出,但也有处理变量和数据库启动/关闭之类的东西)。
[Oracle 7 时代的 SQL*Plus 的非常旧版本不将 MERGE 命令识别为 SQL,并且拒绝对它执行任何操作。但我希望这些版本现在都已经死去并被埋葬了。]
SQLPlus commands are to manage the SQLPLus environment and have really nothing to do with SQL. They are mostly for formatting output or taking in data that is used with SQL to send to the server. SQLPlus is a proprietary Oracle product for connecting to Oracle server and issuiung commands. It is being replaced (officially) by SQL Developer.
I strongly suggest you download the free SQL Developer program from oracle: http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html
it's a great tool for working with sql, pretty easy to get started (install, create a new db connection and start typing sql_ plus does fill in for columns once it know the tablenames. Also, it can run most sqlplus commands if you want to format output, etc. A nice visual intro to the oracle schema and useful if you want to write plsql.