SQL : Structured Query language
This language is used to communicate oracle database and it was developed by IBM in 1972.
- It’s command based language
- It’s similar to English
- Every command should ends with ;
- Commands are not case sensitive
SQL is divided into five languages
- DDL(Date definition language)
- DML(Data manipulation language)
- DQL(Data query language)
- DCL(Data control language)
- TCL(Transaction control language)
DDL (Date definition language):
This language is used to create and manage Objects.
The DDL commands are 1.create 2.alter 3.drop 4.truncate 5.rename
DML (Data manipulation language);
This is used to manipulate the data present in the table
The DML commands are 1.INSERT 2.UPDATE 3.DELETE 4.MERGE
DQL (Data query language);
This language is used to retrieve the data from table
The DQL commands is 1.SELECT
DCL (Data control language);
This language is mainly for Security purpose
The DCL commands are 1.GRANT 2.REVOKE
TCL (Transaction control language);
The TCL commands are 1.COMMIT 2.ROLLBACK 3.SAVEPOINT
Table: it’s an object used to store the data into database.it’s collection of rows and columns.
Char: used to store alpha numeric values .this data type is of fixed length maximum size is 2000 bytes.
Varchar2: Used to store alpha numeric values. this data type is of variable length.maximum Size is 4000 bytes.
Used to store numeric values.
P stands for precission
S stands for Scale
Maximum size for both precission and scale ranges from 1 to 38
Used to store date values.
The date ranges from 01-JAN-4712 BC to 31-DEC-9999 AD
Used to store alpha numeric values. Maximum size is 4GB
Used to store binary data. Maximum size is 4GB
Used to store binary files
If size is 4GB internal to data base.if size is >4GB external to the data base at OS level.