Take the 2-minute tour ×

I want to know the difference between Oracle SQL, PL/SQL and SQL Server's T-SQL.

Right now I'm using SQL Server (Management Studio) and I'm accessing data using SQ.

Is Oracle's SQL different from the SQL that is used by SQL Server?

Also what is PL/SQL, is it different from Oracle SQL?

share|improve this question

closed as not constructive by marc_s, Mitch Wheat, DarkCthulhu, Ben, bluefeet Nov 8 '12 at 12:03


This might help : stackoverflow.com/questions/5428662/… –  motiur Nov 8 '12 at 9:48
-1 Typical write-me-a-book question. Instead of StackOverflow you should use Google. –  Lukas Stejskal Nov 8 '12 at 9:48
I want to know how to fly to the moon. But I don't post that here. Oh wait... –  ppeterka Nov 8 '12 at 9:49
add comment

2 Answers

All major database vendors have their own proprietary extensions to standard SQL. Oracle's SQL is different to Microsoft's T-SQL. Other databases such as MySQL and PostgreSQL are different again.

One example of the differences between the various dialects is the way you select the first n rows. In SQL Server you can use SELECT TOP 3. In Oracle you can use WHERE rownum <= 3. MySQL and PostgreSQL both support LIMIT 3. The SQL standard is FETCH FIRST 3 ROWS ONLY.

PL/SQL is Oracle's language for writing procedures. It is an extension of SQL, adding many features that are typical in procedural programming languages, such as variables, loops and arrays.

share|improve this answer
all of which could easily be discovered by OP with a quick and easy internet search...I firmly believe that by answering questions such as this you are making people lazier. –  Mitch Wheat Nov 8 '12 at 9:51
add comment

SQL is a standard but there is no such thing as "normal" SQL. Each database vendor tries to create a version of SQL which is slightly different from all the other vendors. This is because of shortcomings of the standard, "clever" engineers, vendor lock-in and stupidity.

PL/SQL is an Oracle extension to SQL to write scripts. You can use it to define stored procedures, new functions and similar things.

share|improve this answer
ok, is mysql different from pl/sql? –  being fab Nov 8 '12 at 9:53
PL/SQL is a programming language like Pascal or ADA. It's only supported by Oracle. –  Aaron Digulla Nov 8 '12 at 10:12
add comment
