CPD TECHNOLOGIESTM
-An ISO 9001: 2008 Certified
Email: Support@cpd-india.com
Add:- Block C-9/8, Sector -7, Rohini, Delhi 110085, India
What is SQL?
 SQL stands for Structured Query Language.
 Its main aim to store, access and mainpulate data in realtional database.
 SQL was developed at IBM company by Donald D. Chamberline and Reymond
F.Boyce. In early 1970s.
All relational database management system like MySQL, MS Access, Oracle and
SQL server use SQL as astandered database langauge.
SQL
MySQL ORACLE SQL Server
USES of SQL
• SQL is used to communicate with a database
• Used to perform task such as insert data,
update data in database.
• A tool to retrieve the required information
from database.
SQL Language Statement
›Clause: The clause are component of the statement
and queries.
›Expression: A combination of symbol and operators
that the database system evaluates to obtain a single data
value
›Queries: Queries are used to give command to server
to perform specific task.
What SQL can Do?
SQL
Create Read Update Delete
(DDL)
Command Description
CREATE Create a new table and a view of a table
ALTER Modify an existing database object, such as
table.
DROP Delete an entire table, a view of a table or other
object in database.
Data Manipulation Language (DML)
Command Description
SELECT Retrieve certain record from one or more table.
INSERT Create a record
UPDATE Modify records
DELETE Delete records
Data Control Language (DCL)
Command Description
GRANT Gives a privilege to user
REVOKE Take back privilege granted from user
SQL
Syntax
Select * from Student;
The above SQL Statement select all records in the “Student” table:
Name Program Enrollment Number
Harsha MCA 126901230
Deepak BCA 125689023
CREATE Statement
Create database databaseName;
Create table Student
(
Name varchar(20), //Name has varchar Datatype having size of 20 charecter
Program varchar(10),
Enrol_No int //Enrol_No has integer datatype
)
INSERT Statement
The following SQL statement insert data into student table.
Insert into
Student(Name, Program, Enrol_No)
values(‘Aman’, ‘B.Com’, 134567890);
DROP Statement
The following statement is used to drop Database and Table.
Drop database databaseName; //delete database
Drop table Student; //delete table from database
UPDATE Statement
Update Student
Set Name=‘Anamika’
Where Enrol_No= 126901230 //Condition
Want big impact?

What is SQL Server?

  • 1.
    CPD TECHNOLOGIESTM -An ISO9001: 2008 Certified Email: Support@cpd-india.com Add:- Block C-9/8, Sector -7, Rohini, Delhi 110085, India
  • 2.
    What is SQL? SQL stands for Structured Query Language.  Its main aim to store, access and mainpulate data in realtional database.  SQL was developed at IBM company by Donald D. Chamberline and Reymond F.Boyce. In early 1970s. All relational database management system like MySQL, MS Access, Oracle and SQL server use SQL as astandered database langauge.
  • 3.
  • 4.
    USES of SQL •SQL is used to communicate with a database • Used to perform task such as insert data, update data in database. • A tool to retrieve the required information from database.
  • 5.
    SQL Language Statement ›Clause:The clause are component of the statement and queries. ›Expression: A combination of symbol and operators that the database system evaluates to obtain a single data value ›Queries: Queries are used to give command to server to perform specific task.
  • 6.
    What SQL canDo? SQL Create Read Update Delete
  • 7.
    (DDL) Command Description CREATE Createa new table and a view of a table ALTER Modify an existing database object, such as table. DROP Delete an entire table, a view of a table or other object in database.
  • 8.
    Data Manipulation Language(DML) Command Description SELECT Retrieve certain record from one or more table. INSERT Create a record UPDATE Modify records DELETE Delete records
  • 9.
    Data Control Language(DCL) Command Description GRANT Gives a privilege to user REVOKE Take back privilege granted from user
  • 10.
    SQL Syntax Select * fromStudent; The above SQL Statement select all records in the “Student” table: Name Program Enrollment Number Harsha MCA 126901230 Deepak BCA 125689023
  • 11.
    CREATE Statement Create databasedatabaseName; Create table Student ( Name varchar(20), //Name has varchar Datatype having size of 20 charecter Program varchar(10), Enrol_No int //Enrol_No has integer datatype )
  • 12.
    INSERT Statement The followingSQL statement insert data into student table. Insert into Student(Name, Program, Enrol_No) values(‘Aman’, ‘B.Com’, 134567890);
  • 13.
    DROP Statement The followingstatement is used to drop Database and Table. Drop database databaseName; //delete database Drop table Student; //delete table from database
  • 14.
    UPDATE Statement Update Student SetName=‘Anamika’ Where Enrol_No= 126901230 //Condition
  • 15.