499110Q6. What Is SQL and Its Type?: Data Definition Language (DDL) Statements
499110Q6. What Is SQL and Its Type?: Data Definition Language (DDL) Statements
SQL stands for Structured Query Language. SQL language is used to create,
transform and retrieve information from RDBMS (Relational Database
Management Systems.SQL is a declarative programming language designed for
creating and querying relational database management systems. SQL is
relatively simple language, but its also very po!erful.
SQL can insert data into database tables. SQL can modify data in e"isting
database tables. SQL can delete data from SQL database tables. #inally SQL
can modify t$e database structure itself % create&modify&delete tables and ot$er
database ob'ects.
SQL uses set of commands to manipulate t$e data in relational databases. #or
e"ample SQL ()S*R+ is used to insert data in database tables. SQL S*L*,+
command is used to retrieve data from one or more database tables. SQL
-.D/+* is used to modify e"isting database records.
+ypes of SQL01
Data Definition Language (DDL) Statements: Data definition language (DDL)
statements let you to perform these tasks:
Create, alter, and drop schema objects
Grant and revoke privileges and roles
naly!e information on a table, inde", or cluster
#stablish auditing options
dd comments to the data dictionary
Data Manipulation Language (DML) Statements
Data manipulation language (D$L) statements access and manipulate data in
e"isting schema objects% &hese statements do not implicitly commit the current
transaction% &he data manipulation language statements are:
CALL
DELETE
EXPLAIN PLAN
INSERT
LOCK TABLE
MERGE
SELECT
UPDATE
&he SELECT statement is a limited form of D$L statement in that it can only
access data in the database% 't cannot manipulate data in the database, although it
can operate on the accessed data before returning the results of the (uery%
Transaction Control Statements: &ransaction control statements manage changes
made by D$L statements% &he transaction control statements are:
COMMIT
ROLLBACK
SAVEPOINT
SET TRANSACTION
ll transaction control statements, e"cept certain forms of the COMMIT and ROLLBACK
commands, are supported in )L*+,L% -or information on the restrictions, see C.$$'