PLSQL

PL/SQL

PL/SQL stands for (Procedural Language/Structure Query Language). It is extension of SQL

1.Bascis

1.Datatpye
Below are supported Datatypes in PL/SQL which are supported in SQL.

  Data type Syntax
1 Integer INTEGER
2 Smallint SMALLINT
3 Numeric NUMERIC(P,S)
4 Real REAL
5 Decimal DECIMAL(P,S)
6 Float FLOAT(P)
7 Character CHAR(X)
8 Character varying VARCHAR2(X)
9 Date Date
10 Time TIME

2.Variables

Variable Declaration 
Variable_name datatype;
a number;

Variable Initialization
Variable_name datatype:=value;
a number=10;

3. Input Statement :
to provide input value at run time by using operator (&).

4. Output Statement:

dbms_output.put_line ('Message' || variable);
dbms_output.put_line ('Sum: ' || c);

Basic Syntax

begin
    dbms_output.put_line("Hello word");
end;

Very simple, in the place of { }, we use begin … end;