We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2
Commands and their functionalities:
- DDL (Data Definition Language):
● CREATE Create TABLE, DATABASE, INDEX or VIEW ● DROP Delete TABLE, DATABASE, or INDEX ● ALTER TABLE Add/Remove columns from table ● TRUNCATE Removes all records from a table. ● RENAME Rename an object existing in the database.
- DML (Data Manipulation Language):
● INSERT Insert data into a table. ● UPDATE Update table data. ● DELETE Delete rows from a table.
- DQL (Data Query Language):
● SELECT Select data from database.
- DCL (Data Control Language):
● GRANT Access privileges to the database. ● REVOKE Withdraws the user’s access privileges.
- TCL (Transaction Control Language):
● BEGIN TRANSACTION used to begin a transaction. ● COMMIT used to apply changes and end transactions. ● ROLLBACK used to discard changes and end transactions. ● SAVEPOINT points within the groups of transactions in which to ROLLBACK.
- Few more important clauses:
● AS Rename an attribute or table with an alias.
● FROM Specifying the table we are accessing the data from. ● WHERE Conditional statement to filter the data. ● JOIN Combine rows from 2 or more tables. ● AND Combine conditions in the query. All must be met. ● OR Combine conditions in a query. One must be met. ● LIKE Search for patterns in a column. (Regex operations) ● IN Specify multiple values when using WHERE. ● IS NULL Return only rows with a NULL value. ● LIMIT Limit the number of rows returned. ● CASE Return value on a specified condition.