Introduction to SQL

SQL stands for Structured Query Language which is used to access the database,manipulate the databases.

Structured query language(sql) is:

  • The ANSI(American National Standard Institute)standard for operating relational databases.
  • Efficient,easy to learn and use
  • SQL is set of statements with which all programs and users access data in Microsoft sql database or in oracle database
  • Querying data
  • Inserting,updating,and deleting rows in a table
  • Creating replacing,altering,and dropping objects
  • Controlling access to the database and its objects
  • Guaranteeing database consistency and integrity 
SQL unifies all of the preceding tasks in one consistent language and enables you to work with data at a logical level.

SQL commands:

SQL commands to interact with Relational Databases are CREATE,SELECT,INSERT,UPDATE,DELETE and DROP,commands can be classified into groups based on their nature.

DML - Data Manipulation Language:

CommandDescription
SELECTRetrieves certain records from one or more tables
INSERTCreates a record
UPDATEModifies records
DELETEDeletes records

DDL - Data Definition Language:

CommandDescription
CREATECreates a new table, a view of a table, or other object in database
ALTERModifies an existing database object, such as a table.
DROPDeletes an entire table, a view of a table or other object in the database.

DCL - Data Control Language:

CommandDescription
GRANTGives a privilege to user
REVOKETakes back privileges granted from user

No comments:

Post a Comment