SQL Commands

 What is SQL
    SQL stands for Structured Query Language.
    It is designed for managing data in a relational database management system (RDBMS).
    It is pronounced as S-Q-L or sometime See-Qwell.
    SQL is a database language, it is used for database creation, deletion, fetching rows and modifying rows etc.
    SQL depends on relational algebra and tuple relational calculus.

All DBMS like MySQL, Oracle, MS Access, Sybase, Informix, Postgres and SQL Server use SQL as standard database language.

Why SQL is required
SQL is required:
    To create new databases, tables and views
    To insert records in a database
    To update records in a database
    To delete records from a database
    To retrieve data from a database

What SQL does
    With SQL, we can query our database in a numbers of ways, using English-like statements.
    With SQL, user can access data from relational database management system.
    It allows user to describe the data.
    It allows user to define the data in database and manipulate it when needed.
    It allows user to create and drop database and table.
    It allows user to create view, stored procedure, function in a database.
    It allows user to set permission on tables, procedure and view.

SQL Commands:

The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be classified into groups based on their nature:

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.

DML - Data Manipulation Language:

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

 DCL - Data Control Language:

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

 

SQL Queries Click here

SQL Data base Click here


 







No comments:

Post a Comment