views:

47

answers:

3

Does the SQL syntax differ in any way for SQL Plus and apex.oracle.com
From this article I can assume that it doesn't, but I want to be sure. Is SQL Plus only an environment that is able to connect to an Oracle server ?

I'm asking this because I just started learning Oracle's SQL syntax and I don't have access to my faculty's server from home. The only solution I found so far is Apex since I'm not planning to install a server on my laptop.

+3  A: 

The SQL commands are identical. They are all passed directly to the database engine for execution.

SQL*Plus has a bunch of extra commands (mostly for formatting output, but also stuff like dealing with variables and database startup/shutdown).

[Very old versions of SQL*Plus from the Oracle 7 era don't recognize the MERGE command as SQL and would refuse to do anything with it. But I'd hope those versions are all dead and buried by now.]

Gary
+2  A: 

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.

Joe
what about apex ? can you give me an example of a command that won't run there ? Does the SQL Developer contain an oracle server ? (It's ~100MB.. I don't think it does.) As I said, I'm trying to avoid installing a server on my laptop since I'm running Win7 on 2GB RAM, and a server would kill my laptop :(
Victor Z.
@Victor: No, SQL Developer is a client, not a server. You use it to connect to the server.
Jeffrey Kemp
Victor is correct. sql developer is a java based client app. Very nice features - plus ability to graphical model and generate queries.
Joe
@Joe, Victor asked if SQL Developer "contained" an oracle server - and the answer is "no".
Jeffrey Kemp
+2  A: 

Is SQL Plus only an environment that is able to connect to an Oracle server?

Yes, SQL*Plus is not very useful unless you can connect to an Oracle database server.

I'm asking this because I just started learning Oracle's SQL syntax and I don't have access to my faculty's server from home. The only solution I found so far is Apex since I'm not planning to install a server on my laptop.

If you cannot connect to your faculty's database server from home, you have no choice but to install your own server somewhere. Apex only runs on an Oracle database server.

However, it's not too difficult nowadays, as long as you follow the installation instructions carefully.

Another option is to get a free account at apex.oracle.com. You'll be able to use Apex's SQL interface. I don't think you can connect to it using SQL Developer, though.

Alternatively, you can start up a simple pre-prepared Apex instance on Amazon's EC2. With this option, if you open the relevant port (1521) you'll be able to connect to it using SQL Developer.

Jeffrey Kemp
I will try to stick with Apex for now, already got a free account. If my professor will insist on SQL*Plus I'll have to install a linux and a server in dual-boot (again, pain for my HDD). Thanks.
Victor Z.
a simple, easy oracle to install locally is Oracle Express Edition. Very light oracle db allows you to connect locally, quickly and sql devdeloper will connect to it easily. It also has sqlplus command line if needed as well as nice web-gui UI.
Joe
free download from here:http://www.oracle.com/technetwork/database/express-edition/downloads/102xewinsoft-090667.html
Joe
You can install Oracle server on Windows as well, if that's your OS. I run Oracle 11gR1 on WinXP on this laptop (2GB RAM) for experimental purposes. Alternatively, if you have enough RAM you could try running it in a VM.
Jeffrey Kemp