Tuesday, September 25, 2007
SQL Fundamentals
SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database. SQL is like plain English: easy to understand and to write. SQL statements into various categories, which are:
• Data Definition Language
• Data Manipulation Language
• Data Control Language.
• Transaction Control Language
• Embedded SQL statements
Data Definition Language (DDL) statements:
DDL statements are used to define, alter, or drop database objects. The following table gives an overview about usage of DDL statements in ORACLE (a commercially used database):
Data Manipulation Language (DML) statements
Once the tables have been created, the DML statements enable users to query or manipulate data in existing schemas objects. DML statements are normally the most frequently used commands. The following table gives an overview about the usage of DML statements in ORACLE.
Data Control Language (DCL)
A privilege can either be granted to a User with the help of GRANT statement. The privileges assigned can be SELECT, ALTER, DELETE, EXECUTE, INSERT, INDEX etc. In addition to granting of privileges, you can also revoke it by using REVOKE command.
Transaction Control Statements (TCL) statements:
TCL statements manage the change made by DML statements, and group DML statements into transactions. The following table gives an overview about the usage of TCL statements in ORACLE.
Embedded SQL statements
The SQL statements used to incorporate DDL,DML and transaction control statements within the body of a procedural language program, are known as Embedded SQL statements. The following table gives an overview about the usage of Embedded SQL statements in ORACLE.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment