0% found this document useful (0 votes)
57 views

SQL Statements Categories: DDL - Data Definition Language.: Create Alter Drop

The document discusses different categories of SQL statements: DDL, DML, and DCL. DDL statements are used to define, alter, or drop database objects and perform implicit commits. DML statements are used to access, create, modify or delete data within database structures. DCL statements control transactions, allowing commits to save changes permanently or rollbacks to undo transaction changes.

Uploaded by

SuneelTej
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

SQL Statements Categories: DDL - Data Definition Language.: Create Alter Drop

The document discusses different categories of SQL statements: DDL, DML, and DCL. DDL statements are used to define, alter, or drop database objects and perform implicit commits. DML statements are used to access, create, modify or delete data within database structures. DCL statements control transactions, allowing commits to save changes permanently or rollbacks to undo transaction changes.

Uploaded by

SuneelTej
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL Statements categories: DDL - Data Definition Language.

DDL is used to define, alter, or drop database objects and their privileges. DDL statements will implicitly perform a commit.

DDL Statements:
Create Alter Drop Truncate It is used to create objects(tables, views) in the database. It is used to alter the structure of the database objects. delete database objects (It will invalidate the dependent objects ,it also drops indexes, triggers and referential integrity constraints ). remove all records from a table, including all spaces allocated for the records are removed (It is fast as compared to Delete and does not generate undo information as Delete does. It performs an implicit commit as it is a DDL. It resets the high water mark.) assigning privileges

Grant

DML - Data Manipulation Language.


DML is used to access, create, modify or delete data in the structures of the database.

DML Statements:
Select Insert Update Delete Select data from the database It is used to insert data into a table It is used to update existing data within a table It removes rows from the table.

DCL - Data Control Language


Following are the examples of Data control Statements.

DCL Statements:
Commit Savepoint It will end the current transaction making the changes permanent and visible to all users.. It will identify a point(named SAVEPOINT) in a transaction to which you can

later roll back Rollback SetTransaction It will undo all the changes made by the current transaction. It is used to define the properties of a transaction.

You might also like