SQL tutorial | Interview questions | Oracle
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How Many Data Types Are Supported?

Go down

How Many Data Types Are Supported? Empty How Many Data Types Are Supported?

Post by Micheal Tue Jan 19, 2010 7:49 pm

PL/SQL supports two groups of data types:
SQL Data Types - All data types used for table columns.
PL/SQL Special Data Types - Like BOOLEAN or PLS_INTEGER.
The script below shows some data type examples:
SQL> set serveroutput on;
SQL> DECLARE
2 title VARCHAR(Cool;
3 salary NUMBER;
4 seeking_job BOOLEAN;
5 BEGIN
6 title := 'DBA';
7 salary := 50000;
8 seeking_job := TRUE;
9 DBMS_OUTPUT.PUT_LINE('Job Title: ' || title);
10 DBMS_OUTPUT.PUT_LINE('Expected salary: ' || TO_CHAR(salary));
11 END;
12 /
Job Title: DBA
Expected salary: 50000

Micheal
Admin

Posts : 243
Join date : 2010-01-10

http://sql-tutorial.co.cc

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum