What is SQL Server?

Preview:

Citation preview

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

Data Defination Language (DDL)

Command DescriptionCREATE 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 DescriptionGRANT Gives a privilege to user

REVOKE Take back privilege granted from user

SQLSyntax

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 StatementCreate database databaseName;Create table Student(Name varchar(20), //Name has varchar Datatype having size of 20 charecterProgram 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 StatementThe following statement is used to drop Database and Table.

Drop database databaseName; //delete database

Drop table Student; //delete table from database

UPDATE StatementUpdate Student Set Name=‘Anamika’Where Enrol_No= 126901230 //Condition

Want big impact? CPD TECHNOLOGIESTMAn ISO 9001: 2008 Certified

BLOCK C 9/8, SECTOR -7, ROHINI, DELHI-110085, INDIA

LANDMARK: NEAR ROHINI EAST METRO STATION,

OPPOSITE METRO PILLAR NO-397

TELEPHONE: 011-65164822

MOBILE: +91- 8860352748

EMAIL: SUPPORT@CPD-INDIA.COM

Recommended