Oracle/DB2/Postgresql/Mysql/Hadoop/Greenplum/Postgres-xl/Mongodb
分类: Oracle
2012-08-28 10:18:15
Query statements Allow you to retrieve rows stored in database tables. You write a query using the SQL SELECT statement.
Data Manipulation Language (DML) statements Allow you to modify the contents of tables. There are three DML statements:
INSERT Allows you to add rows to a table.
UPDATE Allows you to change a row.
DELETE Allows you to remove rows.
Data Definition Language (DDL) statements Allow you to define the data structures, such as tables, that make up a database. There are five basic types of DDL statements:
CREATE Allows you to create a database structure. For example, CREATE TABLE is used to create a table; another example is CREATE USER, which is used to create a database user.
ALTER Allows you to modify a database structure. For example, ALTER TABLE is used to modify a table.
DROP Allows you to remove a database structure. For example, DROP TABLE is used to remove a table.
RENAME Allows you to change the name of a table.
TRUNCATE Allows you to delete the entire contents of a table.
Transaction Control (TC) statements Allow you to permanently record the changes made to the rows stored in a table or undo those changes. There are three TC statements:
COMMIT Allows you to permanently record changes made to rows.
ROLLBACK Allows you to undo changes made to rows.
SAVEPOINT Allows you to set a “savepoint” to which you can roll back changes made to rows.
Data Control Language (DCL) statements Allow you to change the permissions on database structures. There are two DCL statements:
GRANT Allows you to give another user access to your database structures, such as tables.
REVOKE Allows you to prevent another user from accessing to your database structures, such as tables.