SQL Commands

SQL Language/commands are used to perform various functions. These functions include building database objects, manipulating objects, loading data to database tables, updating existing data in tables, deleting data, performing database queries, controlling database access, and overall database administration.
The various types of SQL Language/Commands are; 
·         DDL (Data Definition Language) – Allows users to create, modify and deletion of database objects (Database, Tables and columns, Index, View, Synonym, Procedure, Function and Trigger)
The various DDL commands are;
o    CREATE TABLE
o    ALTER TABLE
o    DROP TABLE
o    ALTER COLUMN
o    DROP COLUMN
o    CREATE INDEX
o    ALTER INDEX
o    DROP INDEX
o    CREATE VIEW
o    DROP VIEW
o    CREATE SYNONYM
o    DROP SYNONYM
o    CREATE PROCEDURE
o    DROP PROCEDURE
o    CREATE FUNCTION
o    DROP FUNCTION
o    CREATE TRIGGER
o    DROP TRIGGER
·         DML (Data Manipulation Language) – Allows users to manipulate data within objects of a relational database.
The various DML commands are;
o   INSERT
o   UPDATE
o   DELETE
o   TRUNCATE
·         DQL (Data Query Language) – Allows users to select/fetch data from database.
o    SELECT
·         DCL (Data Control Language) – Allows users to control access to data within the database.
The various DCL commands are;
·         Data administration commands Database administration is the overall administration of a database. Allows users to perform audits and perform analyses on operations/system performance within the database
o    ALTER SERVER AUDIT
·         Transactional Control Language (TCL)– Allows users to manage the database transactions.
The various TCL commands are:
o   COMMIT - Saves all transactions to database of current session.
o   ROLLBACK - Undoes all the transactions from database of current session.
o  SAVEPOINT - Creates points within groups of transactions in which to ROLLBACK.
o   SET TRANSACTION - Places a name on a transaction.

No comments:

Post a Comment