August 3, 2010

SQL INTRO

SQL is  Structured Query Language to acces database For Manipulations and Analysis.
SQL works with database programs like MS Access, DB2, Informix, MS SQL Server, Oracle, Sybase, etc.


Queries are Categorised as


  • SQL Data Manipulation Language (DML)
  • SQL Data Definition Language (DDL)
  • SQL Tansaction Control Language(TCL)
  • Data Control Language (DCL)
1.SQL Data Manipulation Language (DML)



SQL (Structured Query Language) is a syntax for executing queries. But the SQL language also includes a syntax to update, insert, and delete records.


These query and update commands together form the Data Manipulation Language (DML) part of SQL:


• SELECT - extracts data from a database table


• UPDATE - updates data in a database table


• DELETE - deletes data from a database table


• INSERT INTO - inserts new data into a database table




2.SQL Data Definition Language (DDL)




The Data Definition Language (DDL) part of SQL permits database tables to be created or deleted. We can also define indexes (keys), specify links between tables, and impose constraints between database tables.


The most important DDL statements in SQL are:


• CREATE TABLE - creates a new database table


• ALTER TABLE - alters (changes) a database table


• DROP TABLE - deletes a database table


• CREATE INDEX - creates an index (search key)


• DROP INDEX - deletes an index


3.Transaction Control Language (TCL) - These SQL commands are used for managing changes affecting the data. These commands are COMMIT, ROLLBACK, and SAVEPOINT.




4.Data Control Language (DCL) - These SQL commands are used for providing security to database objects. These commands are GRANT and REVOKE.

No comments:

Post a Comment

Thanks for your comments submitted.,will review and Post soon! by admin.

COALESCE-SQL

Coalesce- return the null values from the expression. It works similar to a case statement where if expression 1 is false then goes to expr...