SQL COMMANDS
SQL COMMANDS
• SQL commands are instructions. It is used to communicate
with the database. It is also used to perform specific tasks,
functions, and queries of data.
• SQL can perform various tasks like create a table, add data
to tables, drop the table, modify the table, set permission
for users.
SQL DATA TYPES
SQL COMMANDS
DATA DEFINITION LANGUAGE (DDL)
• DDL changes the structure of the table like creating a table,
deleting a table, altering a table, etc.
• All the command of DDL are auto-committed that means it
permanently save all the changes in the database.
DATA DEFINITION LANGUAGE (DDL)
DATA MANIPULATION LANGUAGE
DML commands are used to modify the database. It is
responsible for all form of changes in the database.
The command of DML is not auto-committed that means it
can't permanently save all the changes in the database.
They can be rollback.
DATA MANIPULATION LANGUAGE
DATA QUERY LANGUAGE
DQL commands are used for fetching data from a relational
database. They perform read-only queries of data.
The only command, 'SELECT' is equivalent to the projection
operation in relational algebra.
This command selects the attribute based on the condition
described by the WHERE clause and returns them.
DATA CONTROL LANGUAGE
DCL is used to access the stored data. It is used to revoke
and grant the user the required access to a database.
In the database, this language does not have the feature of
rollback. It is a part of the structured query language (SQL).