SQL Syntax

SQL Syntax:-

1) SQL is not a case sensitive :-

                    The SQL statement

                     SELECT * from
                                 is same as
                       select * from

2)Semicolon ( ; ) at the End of SQL Statement :-


      a) Some database need semicolon ( ; ) at the end of SQL statement to represent as end of SQL statement
        Ex :- Mysql , Oracle

      b) Some database does not support semicolon ( ; ) at the end of SQL statement
      Ex :- MS Access, SQL Server .

3) SQL is Categorized into two parts :-

      a) DDL( Data Defination Language ) .
      b) DML( Data Modification Language ) .

      a) DDL( Data Defination Language ) :- DDL has a set of operation which is used to define or construct the database
            
    The SQL Statement under DDL are :- 

 SQL Statement    Description
CREATE DATABASE                create a new database             
CREATE TABLE  create a new table
CREATE INDEX  create a new index
ALTER DATABASE  modifies the database
ALTER TABLE  modifies the database
ALTER INDEX  modifies the database
DROP TABLE  deletes the table
DROP INDEX  deletes the index




      b) DML( Data Modification Language ) :-DDM has a set of operation which is used to retreive ,insert ,update and modify data from database .

   The SQL Statement under DDM are :-

SQL Statement Description
SELECT                              Retrieve data from database  
INSERT   Inserts data into database        
UPDATE   Updates data from database    
DELETE   Deletes data from database     


No comments:

Post a Comment