What Is The Difference Between PL/PQL And T/SQL

844 Words2 Pages

Introduction:
PL/SQL and T-SQL are completely different programming languages and have different variable declaration , different syntax, different built in- functions and programming capabilities. The only thing in common is they are extensions of SQL and the execution and storage inside the database.
PL/SQL is a procedural language used for Oracle relational database where as T-SQL is a proprietary procedural language of used for Microsoft SQL server and Sybase.

PL/SQL:
PL/SQL stands for Procedure Language extension of SQL.
PL/SQL is extension to SQL which was originally developed by IBM for operations on relational databases. PL/SQL is a structured language which is used in manipulating the data with the help of commands like SELECT, INSERT, CREATE AND GRANT.
Much of PL/SQL syntax is borrowed from Ada.

Data Types:
Number types stores numeric data like integers, floating points ,real numbers and represent quantities to do calculations.
The BINARY_INTEGER data type is identical to PLS_INTEGER. BINARY_INTEGER subtypes can be considered as PLS_INTEGER subtypes BINARY_INTEGER Subtypes
A base type is the data type from which a subtype is derived. A subtype associates a base type with a constraint and so defines a subset of values
BINARY_FLOAT and BINARY_DOUBLE Data types are basically used for high-speed scientific computation. Computations which involves special values that needs to checked for, rather than raising exceptions.
PL/SQL handles transaction control, temporary objects, extended and system stored procedures, conditional processing, exception and error handling and other SQL features.
Example 1:
BEGIN
IF TO_CHAR (SYSDATE, 'DAY') = 'MONDAY'
THEN
Have coffee in Starbucks;
ELSE
Have breakfast in college;
E...

... middle of paper ...

...n T-SQL it is IDENTIY function.

2. In PL/SQL , stored procedures are ATOMIC . If any error occurs inside the stored procedures it rollbacks to the beginning. Whereas in T-SQL TRY CATCH block should be used because stored procedure won't rollback automatically.

Reference:
• PL/SQL Datatypes. (n.d.). PL/SQL Datatypes. Retrieved April 1, 2014, from http://docs.oracle.com/cd/B19306_01/appd
• http://en.wikipedia.org/wiki/PL/SQL
• PL/SQL Tutorial. (n.d.). - PL/SQL programming made easy. Retrieved April 1, 2014, from http://plsql-tutorial.com/
• PL/SQL. (n.d.). Oracle. Retrieved April 1, 2014, from http://www.oracle.com/technetwork/datab
• T-SQL. (n.d.). What is ?. Retrieved April 1, 2014, from http://www.webopedia.com/TERM/T/T_SQL.
• http://en.wikipedia.org/wiki/Transact-SQL.
• http://www.tsql.info/
• http://www.varindersandhu.in/2012/02/17/t-sql-vs-pl-sql/

Open Document