blog




  • Essay / What is the difference between PL/PQL and T/SQL

    Introduction: PL/SQL and T-SQL are completely different programming languages ​​and have different variable declaration, different syntax, built-in functions and different programming capabilities. The only thing in common is that they are extensions of SQL as well as execution and storage in the database. PL/SQL is a procedural language used for Oracle relational database while T-SQL is a proprietary procedural language used for Microsoft SQL server and Sybase. .PL/SQL:PL/SQL stands for SQL Procedural Language Extension.PL/SQL is an extension of SQL that was originally developed by IBM for relational database operations. PL/SQL is a structured language that is used to manipulate data using commands such as SELECT, INSERT, CREATE AND GRANT. Much of the PL/SQL syntax is borrowed from Ada. Data Types: Numeric types store numeric data like integers, floating points, real numbers and represent quantities to perform calculations. The BINARY_INTEGER data type is the same as PLS_INTEGER. BINARY_INTEGER subtypes can be considered PLS_INTEGER subtypes. Subtypes BINARY_INTEGERA base type is the data type from which a subtype is derived. A subtype associates a base type with a constraint and thus defines a subset of values. The BINARY_FLOAT and BINARY_DOUBLE data types are primarily used for high-speed scientific computing. Calculations that involve special values ​​that need to be checked, 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: BEGINIF TO_CHAR (SYSDATE, 'DAY') = 'MONDAY' THENHave coffee at Starbucks;ELSEHave breakfast at college;E...... middle of paper ......n T -SQL is the IDENTIY.2 function. In PL/SQL, stored procedures are ATOMIC. If an error occurs in the stored procedures, it rolls back to the beginning. Whereas in T-SQL, TRY CATCH block should be used because the stored procedure will not be canceled automatically. Reference: • PL/SQL data types. (nd). PL/SQL data types. Retrieved April 1, 2014, from http://docs.oracle.com/cd/B19306_01/appd• http://en.wikipedia.org/wiki/PL/SQL• PL/SQL Tutorial. (nd). - Simplified PL/SQL programming. Retrieved April 1, 2014 from http://plsql-tutorial.com/• PL/SQL. (nd). Oracle. Retrieved April 1, 2014 from http://www.oracle.com/technetwork/datab• T-SQL. (nd). What is ?. Accessed 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/