Basic SQL (Part 1)
There are 3 types of SQL statement:
- Data Manipulation Language (DML), used to manipulate data in a table. 4 types of DML:
- Select, used to query data.
- Insert, used to add new data.
- Update, used to modify existing data.
- Delete, used to remove data.
- Data Definition Language (DDL), used to manipulate structure of the database objects, which include table, view and others. 3 types of DDL:
- Create, used to add new database object.
- Alter, used to modify existing database object structure, for example add column to a table.
- Drop, used to remove database object.
- Transaction Control Language (TCL), used to control the transaction. When user issues the first SQL statement, a transaction will be started and user can decide to end the transaction with either Commit or Rollback.
- Commit, used to save changes made by user.
- Rollback, used to undo all the changes made by user.
- Savepoint, used to make checkpoint for commit or rollback operation.

0 comments:
Post a Comment