SlideShare a Scribd company logo
1 of 16
Structured Query Language(SQL)
BY.,
B. Gowarthini
C. Divya
V. Suruthi
Agenda:
• Introduction
• Datatypes of SQL
• Operators of SQL
• Basic Database Concepts
• Processing capabilities of SQL
• Joins and its types
• Aggregate functions
• Stored procedures
• Index
• Triggers
Introduction:
• SQL is a non procedural language that is used to create,
manipulate and process the database.
Characteristics of SQL:
• Easy to learn and use.
• Large volume of DB can be handled easily.
Datatypes of SQL:
• Like programming languages, datatypes are also available in SQL
• Most commonly used types:
Int
Date
Long
Number
varchar/ nvarchar
Operators of SQL:
Operators in SQL:
 Arithmetic operators : +, -, *, / (Simple mathematical operations)
 Relational operators : =, <, >, <=, >=, <> (For comparing values)
 Logical operators : OR, AND, NOT (For condition clause)
Basic Database concepts:
• Data: -Raw facts and figures useful to an organization.
-Cannot take decisions on basis of data.
• Field : -Set of characters
• Record: -Collection of fields
• Primary key: -Uniquely identifies the records
-Never allow NULL and duplicates
• Foreign key: -Referential integrity
Processing capabilities of SQL
• Data Definition Language (DDL)
• Views
• Data Manipulation Language (DML)
• Data Control Language (DCL)
• Transaction Control Language (TCL)
Processing capabilities of SQL
Data Definition Language (DDL):
Common DDL statements are CREATE, ALTER, DROP.
CREATE – To create new DB, table, index, view etc..,
ALTER - To alter the table, DB etc..,
DROP - To delete objects from DB.
View:
- View is a kind of virtual table.
- It contains rows and columns like a real table.
- We can create a view by selecting fields.
Processing capabilities of SQL
Data Manipulation Language (DML):
- To manipulate the database objects
- Query the DB for information retrieval
- Common DML statements are
 SELECT
 INSERT
 DELETE
 UPDATE
Processing capabilities of SQL
Data Control Language(DCL):
- Controlling access to the data
- Common DCL commands are GRANT , REVOKE
Transaction Control Language (TCL):
- Control the transaction in DB system
- Common TCL commands are COMMIT, ROLLBACK
Joins and its types
• Used to combine rows from two or more tables, based on a
related column between them.
Types:
- Inner Join
- Left Join
- Right Join
- Full Join
- Self Join
Aggregate functions
Stored procedures
• It stored as an object in the database server.
• The code can be reused over and over again and then just call it
to execute it.
Syntax:
CREATE PROCEDURE procedure_name // Create stored proc.
AS
sql_statement
GO;
EXEC procedure_name; //Execute a stored procedure
Index
• Used to retrieve data from the DB very fast.
• Users cannot see the indexes, they are just used to speed up
searches/queries.
Syntax:
CREATE INDEX index_name
ON table_name (column1, column2, ...);
Types:
Clustered index - rows are stored physically on the disk in the
same order
Non Clustered index - second list that has pointers to the
physical rows.
Triggers
• Special kind of Stored procedure
• Automatically invokes whenever a DML and DDL events in DB
occurs
Syntax:
create trigger deep
on emp
for
insert,update,delete
as
print'you can not insert,update and delete this table i'
rollback;
Structured query language(sql)ppt

More Related Content

What's hot

SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands1keydata
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)Ishucs
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Beat Signer
 
Presentation slides of Sequence Query Language (SQL)
Presentation slides of Sequence Query Language (SQL)Presentation slides of Sequence Query Language (SQL)
Presentation slides of Sequence Query Language (SQL)Punjab University
 
Sql – Structured Query Language
Sql – Structured Query LanguageSql – Structured Query Language
Sql – Structured Query Languagepandey3045_bit
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginnersRam Sagar Mourya
 
Sql Objects And PL/SQL
Sql Objects And PL/SQLSql Objects And PL/SQL
Sql Objects And PL/SQLGary Myers
 
SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive TechandMate
 
SQL Queries
SQL QueriesSQL Queries
SQL QueriesNilt1234
 

What's hot (20)

Introduction to sql
Introduction to sqlIntroduction to sql
Introduction to sql
 
SQL Tutorial - Basic Commands
SQL Tutorial - Basic CommandsSQL Tutorial - Basic Commands
SQL Tutorial - Basic Commands
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
SQL commands
SQL commandsSQL commands
SQL commands
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
 
Sql commands
Sql commandsSql commands
Sql commands
 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
 
Presentation slides of Sequence Query Language (SQL)
Presentation slides of Sequence Query Language (SQL)Presentation slides of Sequence Query Language (SQL)
Presentation slides of Sequence Query Language (SQL)
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
 
Sql – Structured Query Language
Sql – Structured Query LanguageSql – Structured Query Language
Sql – Structured Query Language
 
SQL for interview
SQL for interviewSQL for interview
SQL for interview
 
Sql
SqlSql
Sql
 
A must Sql notes for beginners
A must Sql notes for beginnersA must Sql notes for beginners
A must Sql notes for beginners
 
Basic sql Commands
Basic sql CommandsBasic sql Commands
Basic sql Commands
 
Sql Objects And PL/SQL
Sql Objects And PL/SQLSql Objects And PL/SQL
Sql Objects And PL/SQL
 
SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive
 
Sql - Structured Query Language
Sql - Structured Query LanguageSql - Structured Query Language
Sql - Structured Query Language
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
 

Similar to Structured query language(sql)ppt

Introduction to SQL, SQL*Plus
Introduction to SQL, SQL*PlusIntroduction to SQL, SQL*Plus
Introduction to SQL, SQL*PlusChhom Karath
 
DataBase Management systems (IM).pptx
DataBase Management systems (IM).pptxDataBase Management systems (IM).pptx
DataBase Management systems (IM).pptxGooglePay16
 
Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Tushar Wagh
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Vidyasagar Mundroy
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Lucas Jellema
 
SQL SERVER Training in Pune Slides
SQL SERVER Training in Pune SlidesSQL SERVER Training in Pune Slides
SQL SERVER Training in Pune Slidesenosislearningcom
 
Implementing the Databese Server session 02
Implementing the Databese Server session 02Implementing the Databese Server session 02
Implementing the Databese Server session 02Guillermo Julca
 
Lecture 2 sql {basics date type, constrains , integrity types etc.}
Lecture 2 sql {basics  date type, constrains , integrity types etc.}Lecture 2 sql {basics  date type, constrains , integrity types etc.}
Lecture 2 sql {basics date type, constrains , integrity types etc.}Shubham Shukla
 
Sql and its functions
Sql and its functionsSql and its functions
Sql and its functionsRohit Kumar
 
Islamic University Previous Year Question Solution 2018 (ADBMS)
Islamic University Previous Year Question Solution 2018 (ADBMS)Islamic University Previous Year Question Solution 2018 (ADBMS)
Islamic University Previous Year Question Solution 2018 (ADBMS)Rakibul Hasan Pranto
 
Python programming
Python programmingPython programming
Python programmingSwetha544947
 
Query editor for multi databases
Query editor for multi databasesQuery editor for multi databases
Query editor for multi databasesAarthi Raghavendra
 
SQL Training courses.pptx
SQL Training courses.pptxSQL Training courses.pptx
SQL Training courses.pptxirfanakram32
 
INTRODUCTION OF DATA BASE
INTRODUCTION OF DATA BASEINTRODUCTION OF DATA BASE
INTRODUCTION OF DATA BASEAMUTHAG2
 

Similar to Structured query language(sql)ppt (20)

Introduction to SQL, SQL*Plus
Introduction to SQL, SQL*PlusIntroduction to SQL, SQL*Plus
Introduction to SQL, SQL*Plus
 
DataBase Management systems (IM).pptx
DataBase Management systems (IM).pptxDataBase Management systems (IM).pptx
DataBase Management systems (IM).pptx
 
Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Complete first chapter rdbm 17332
Complete first chapter rdbm 17332
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)
 
SQL Intro
SQL IntroSQL Intro
SQL Intro
 
Pl sql content
Pl sql contentPl sql content
Pl sql content
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)
 
SQL_NOTES.pdf
SQL_NOTES.pdfSQL_NOTES.pdf
SQL_NOTES.pdf
 
SQL SERVER Training in Pune Slides
SQL SERVER Training in Pune SlidesSQL SERVER Training in Pune Slides
SQL SERVER Training in Pune Slides
 
Implementing the Databese Server session 02
Implementing the Databese Server session 02Implementing the Databese Server session 02
Implementing the Databese Server session 02
 
Lecture 2 sql {basics date type, constrains , integrity types etc.}
Lecture 2 sql {basics  date type, constrains , integrity types etc.}Lecture 2 sql {basics  date type, constrains , integrity types etc.}
Lecture 2 sql {basics date type, constrains , integrity types etc.}
 
INTRODUCTION TO DATABASE
INTRODUCTION TO DATABASEINTRODUCTION TO DATABASE
INTRODUCTION TO DATABASE
 
Unit - II.pptx
Unit - II.pptxUnit - II.pptx
Unit - II.pptx
 
Sql and its functions
Sql and its functionsSql and its functions
Sql and its functions
 
Islamic University Previous Year Question Solution 2018 (ADBMS)
Islamic University Previous Year Question Solution 2018 (ADBMS)Islamic University Previous Year Question Solution 2018 (ADBMS)
Islamic University Previous Year Question Solution 2018 (ADBMS)
 
Python programming
Python programmingPython programming
Python programming
 
(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)(Dbms) class 1 & 2 (Presentation)
(Dbms) class 1 & 2 (Presentation)
 
Query editor for multi databases
Query editor for multi databasesQuery editor for multi databases
Query editor for multi databases
 
SQL Training courses.pptx
SQL Training courses.pptxSQL Training courses.pptx
SQL Training courses.pptx
 
INTRODUCTION OF DATA BASE
INTRODUCTION OF DATA BASEINTRODUCTION OF DATA BASE
INTRODUCTION OF DATA BASE
 

More from Gowarthini

More from Gowarthini (6)

.Net
.Net.Net
.Net
 
Oo ps
Oo psOo ps
Oo ps
 
Mvc ppt
Mvc pptMvc ppt
Mvc ppt
 
Cryptography ppt
Cryptography pptCryptography ppt
Cryptography ppt
 
Git overview
Git overviewGit overview
Git overview
 
Basics of networking
Basics of  networkingBasics of  networking
Basics of networking
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 

Recently uploaded (20)

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 

Structured query language(sql)ppt

  • 1. Structured Query Language(SQL) BY., B. Gowarthini C. Divya V. Suruthi
  • 2. Agenda: • Introduction • Datatypes of SQL • Operators of SQL • Basic Database Concepts • Processing capabilities of SQL • Joins and its types • Aggregate functions • Stored procedures • Index • Triggers
  • 3. Introduction: • SQL is a non procedural language that is used to create, manipulate and process the database. Characteristics of SQL: • Easy to learn and use. • Large volume of DB can be handled easily.
  • 4. Datatypes of SQL: • Like programming languages, datatypes are also available in SQL • Most commonly used types: Int Date Long Number varchar/ nvarchar
  • 5. Operators of SQL: Operators in SQL:  Arithmetic operators : +, -, *, / (Simple mathematical operations)  Relational operators : =, <, >, <=, >=, <> (For comparing values)  Logical operators : OR, AND, NOT (For condition clause)
  • 6. Basic Database concepts: • Data: -Raw facts and figures useful to an organization. -Cannot take decisions on basis of data. • Field : -Set of characters • Record: -Collection of fields • Primary key: -Uniquely identifies the records -Never allow NULL and duplicates • Foreign key: -Referential integrity
  • 7. Processing capabilities of SQL • Data Definition Language (DDL) • Views • Data Manipulation Language (DML) • Data Control Language (DCL) • Transaction Control Language (TCL)
  • 8. Processing capabilities of SQL Data Definition Language (DDL): Common DDL statements are CREATE, ALTER, DROP. CREATE – To create new DB, table, index, view etc.., ALTER - To alter the table, DB etc.., DROP - To delete objects from DB. View: - View is a kind of virtual table. - It contains rows and columns like a real table. - We can create a view by selecting fields.
  • 9. Processing capabilities of SQL Data Manipulation Language (DML): - To manipulate the database objects - Query the DB for information retrieval - Common DML statements are  SELECT  INSERT  DELETE  UPDATE
  • 10. Processing capabilities of SQL Data Control Language(DCL): - Controlling access to the data - Common DCL commands are GRANT , REVOKE Transaction Control Language (TCL): - Control the transaction in DB system - Common TCL commands are COMMIT, ROLLBACK
  • 11. Joins and its types • Used to combine rows from two or more tables, based on a related column between them. Types: - Inner Join - Left Join - Right Join - Full Join - Self Join
  • 13. Stored procedures • It stored as an object in the database server. • The code can be reused over and over again and then just call it to execute it. Syntax: CREATE PROCEDURE procedure_name // Create stored proc. AS sql_statement GO; EXEC procedure_name; //Execute a stored procedure
  • 14. Index • Used to retrieve data from the DB very fast. • Users cannot see the indexes, they are just used to speed up searches/queries. Syntax: CREATE INDEX index_name ON table_name (column1, column2, ...); Types: Clustered index - rows are stored physically on the disk in the same order Non Clustered index - second list that has pointers to the physical rows.
  • 15. Triggers • Special kind of Stored procedure • Automatically invokes whenever a DML and DDL events in DB occurs Syntax: create trigger deep on emp for insert,update,delete as print'you can not insert,update and delete this table i' rollback;