Data Base Management System

SQL IS CATEGORIED INTO 5 TYPES BASED ON OPERATION ON DATABASE

THEY ARE:

1).DDL[Data Definition Language]

example: create ,truncate ,alter, flashback, rename, drop

2).DML[Data Manipulation Language]

example: update ,delete ,insert, insert all, merge

3).DCL[Data Control Language]

example: grand , revoke

4).TCL[Transaction Control Language]

example: rollback, save point, commit

5).DQL[Data Query Language]

example: selects

LET’S DESCRIBE EVERYTHING IN DETAIL:

Data Types:

Char(size):

we use these char type for the fields which has the fixed size like state code .

example char(2);TG,AP pan card number[10 characters]

VARCHAR2(SIZE):

we use these when the data size is un predictable .the extra bytes are released.

LONG:

it can hold characters up to 2GB.no need to mention the size for these.

CLOBE:

it allows large objects characters up to 4 GB.

UNICODE:

includes characters belongs to different languages.

NUMERIC:

Number(p):

allows without decimal up to 38 digits.

Number(p ,s):

s→ SCALE: number of digits after decimal.

p→ PRECISION: number of digits allowed it can be up to 38 digits

DATE:

Allows date and time .

time is optional if time not mentioned it stores as the default 12:00 am

FORMAT:DD/MON/YYYY