Data Control Language
From Wikipedia, the free encyclopedia
A Data Control Language (DCL) is a computer language and a subset of SQL, used to control access to data in a database. Examples of DCL commands include:
- GRANT to allow specified users to perform specified tasks.
- REVOKE to cancel previously granted or denied permissions.
The following things can be GRANTED TO or REVOKED FROM a user or role:
- CONNECT allows a user to connect to the database or schema.
- SELECT allows a user to select records.
- INSERT allows a user to insert records.
- UPDATE allows a user to update records.
- DELETE allows a user to delete records.
- USAGE allows a user to use a database object such as a schema or a function
In Oracle, executing a DCL command issues an implicit commit.
In PostgreSQL, executing DCL is transactional, and can be rolled back.