
This is part 2 of a series of introductory Oracle PLSQL tutorials to show you how you can use it to improve database performance and make life simpler for you as an Oracle developer.
PLSQLis a block-structured language like Ada and has the usual built-in scalar datatypes you find in most modern programming languages as well as support for XML (Oracle 9i) and Oracle's LOB (large object) types in Oracle8 and above.
The built-in data types comprise integer, real (floating point), character, date/time and Boolean and support the manipulation of LOB (large object) data types. The standard PL/SQL data types can be extended by defining your own types (not
to be confused with object types declared in the database) in the form of records and PLSQL collections).
Each of the main types (integer, real and character) has several variations and subtypes. For example integer-type variables can be declared as:-
amongst others;
Character types are available as:-
Real/floating point numbers can be declared as:-
In practice, numeric variables are usually declared as NUMBER, with a scale and precision if necessary, for compatibility with the datatypes available in the database or as PLS_INTEGER for efficiency in calculations.
Another integer type BINARY_INTEGER is most often used as the index for PLSQL collections (associative arrays, variable length arrays or nested tables).
Oracle PLSQL tutorial Part 1 Oracle PLSQL tutorial Part 3
For instructor-led PLSQL training in state of the art training centres in Bristol and other cities across the UK see the Oracle training page. Or see our other Oracle tutorials.
---------------------------------------
Looking for more Oracle tips and tricks ? If you're looking for no frills, no fluff, just solid, reliable technical information, take a short cut now and subscribe to our ezine.
Send us your questions and we'll answer them in a future newsletter.
Smartsoft Computing Ltd
Bristol, England
Tel: 0845 0031320
Contact Us
Click here to view our privacy policy .
This site uses hitslink.com to gather statistical information about our visitors. View hitslink privacy policy .
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. UNIX is a registered trademark of The Open Group in the United States and other countries.
© Copyright Smartsoft Computing Ltd 2001-2008. All rights reserved.