SQL Statements:
Fig : SQL Statements |
1) DDL - Data Definition language
CREATE, ALTER , DROP, RENAME, TRUNCATE
i) CREATE : CREATE command used to create Table,Index, View, Procedure, Function, Package,Triggers and Database.
ii) ALTER: ALTER command is used to modify structure of table. It's used to add column, to drop column, and to increase size of column.
iii) DROP: DROP command used to drop table, Index, View, Procedure, Function, Package, Triggers and Database.
iv) TRUNCATE: TRUNCATE command is used to remove all row permanently including space allocated to the recorded.
v )RENAME: RENAME Command is Used to Change the existing name of the table.
2) DML- Data Manipulation language
INSERT, UPDATE, DELETE
i)INSERT: INSERT Command is used to insert values in the specified table.
iI)UPDATE: UPDATE command is used to change the value particular column or Table.
iii)DELETE: DELETE command is used to delete particular record or all record from the Table.
3) SQL Query Statements:
SELECT
i) SELECT: SELECT command is used to retrieval of data from the tables and produce reports
4) DCL: Data Control Language
GRANT,REVOKE
i)GRANT: GRANT command is used to grant privileges to the users.
ii)REVOKE: REVOKE command revoke(taken back) privlilages from users.
5) TCL: Transaction Control Language
COMMIT, ROLLBACK,SAVEPOINT
i)COMMIT: COMMIT is used to commit a transaction.
ii)ROLLBACK: ROLLBACK is used to undone any transaction.
iii)SAVEPOINT: We can set the SAVEPOINT within the transaction.In other words, SAVEPOINT
is used to save particular transaction of a given session. In other words,
Savepoint data is only permanent when commit is executed.
0 comments:
Post a Comment