There are two data types in pl/sql:
1.System Defined Data Type
2.User Defined Data Type
System Defined Data Type:
These Data Types are are already defined along with software and it is also known as predefined data types.The Data Types which we use in SQL same data types are supported by PL/SQL.
User Defined Data Types:
These Data Types are Predefined by the user manually using some keywords like TYPE & SUBTYPE.
EXAMPLE:
Declare
SUBTYPE name IS char(20);
SUBTYPE message IS varchar2(100);
a name;
b message;
BEGIN
a:='Reader';
b:='Welcome to the world of PL/SQL'
Dbms_Output,Put_Line('Hello'||a||b);
End;
Operators in PL/SQL:
The Operators which we use in SQL same Operators are supported by PL/SQL and new extra Operators in PL/SQL is assignment Operator (:=).
Input Statement in PL/SQL:
There is no input statement in PL/SQL,if we want to input the values at run time we need to use '&'.
Output statement in PL/SQL:
Dbms_OutPut,Put_Line()/Put():
This is the output statement in PL/SQL.
Dbms_Output is a Package that includes a number of Procedures and functions that accummulates information.
Syntax1:dbms_output.put_line('message');
Syntax2:dbms_output.put_line('message'||variable);
Syntax3:dbms_output.put_line(variable');
1.System Defined Data Type
2.User Defined Data Type
System Defined Data Type:
These Data Types are are already defined along with software and it is also known as predefined data types.The Data Types which we use in SQL same data types are supported by PL/SQL.
User Defined Data Types:
These Data Types are Predefined by the user manually using some keywords like TYPE & SUBTYPE.
EXAMPLE:
Declare
SUBTYPE name IS char(20);
SUBTYPE message IS varchar2(100);
a name;
b message;
BEGIN
a:='Reader';
b:='Welcome to the world of PL/SQL'
Dbms_Output,Put_Line('Hello'||a||b);
End;
Operators in PL/SQL:
The Operators which we use in SQL same Operators are supported by PL/SQL and new extra Operators in PL/SQL is assignment Operator (:=).
Input Statement in PL/SQL:
There is no input statement in PL/SQL,if we want to input the values at run time we need to use '&'.
Output statement in PL/SQL:
Dbms_OutPut,Put_Line()/Put():
This is the output statement in PL/SQL.
Dbms_Output is a Package that includes a number of Procedures and functions that accummulates information.
Syntax1:dbms_output.put_line('message');
Syntax2:dbms_output.put_line('message'||variable);
Syntax3:dbms_output.put_line(variable');
No comments:
Post a Comment
If you Like my blog Spread it and help friends for whom this blog is useful for their career.