SlideShare a Scribd company logo
1 of 23
sql statements,operators and 
joins 
typing speed:25 
Muhammed Thanveer Melayi 
Muhammedthanveermelayi@outlook.com 
Muhammed Thanveer Danish Melayi 
Muhammed Thanveer M
• different type of statements 
1.DML 
2.DDL 
3.DCL
DML 
DML is abbreviation of Data Manipulation 
Language. It is used to retrieve, store, modify, 
delete, insert and update data in database. 
Examples: SELECT, UPDATE, INSERT 
statements
SYNTAX OF INSERT INTO 
INSERT INTO table_name (column1,column2,column3,...) 
VALUES (value1,value2,value3,...); 
INSERT INTO Customers (CustomerName, ContactName, Address, City, 
PostalCode, Country) 
VALUES ('Cardinal','Tom B. Erichsen','Skagen 
21','Stavanger','4006','Norway');
DDL 
DDL is abbreviation of Data Definition Language. It is used 
to create and modify the structure of database objects in 
database. 
Examples: CREATE, ALTER, DROP statements
SYNTAX OF CREATE 
CREATE TABLE table_name 
( 
column_name1 data_type(size), 
column_name2 data_type(size), 
column_name3 data_type(size), 
.... 
); 
CREATE TABLE Persons 
( 
PersonID int, 
LastName varchar(255), 
FirstName varchar(255), 
Address varchar(255), 
City varchar(255) 
);
DCL 
DCL is abbreviation of Data Control Language. It is used 
to create roles, permissions, and referential integrity as 
well it is used to control access to database by securing 
it. 
Examples: GRANT, REVOKE statements 
• GRANT - gives user's access privileges to database 
• REVOKE - withdraw access privileges given with the GRANT command
GRANT 
privilege_name 
ON object_name 
TO {user_name 
|PUBLIC 
• privilege_name is the access right or privilege granted to the user. 
Some of the access rights are ALL, EXECUTE, and SELECT. 
• object_name is the name of an database object like TABLE, VIEW, 
STORED PROC and SEQUENCE. 
• user_name is the name of the user to whom an access right is 
being granted. 
• PUBLIC is used to grant access rights to all users. 
• ROLES are a set of privileges grouped together. 
• WITH GRANT OPTION - allows a user to grant access rights to other 
users. 
|role_name} 
[WITH GRANT 
OPTION];
SYNTAX OF REVOKE 
REVOKE 
privilege_name 
ON object_name 
FROM {user_name 
|PUBLIC 
|role_name}
example for grant 
grant select --granting select privilege 
on emp 
to public --you can give username at the place of public 
example for revoke 
revoke select--removing select privilege 
on emp 
from public
Joins 
SQL JOIN clause is used to combine rows from two or more 
tables, based on a common field between them. 
1.inner join 
2.full join 
3.left join 
4.right join
SQL INNER JOIN Keyword 
The INNER JOIN keyword selects all rows from both tables as long as there 
is a match between the columns in both tables. 
SQL INNER JOIN Syntax 
SELECT column_name(s) 
FROM table1 
INNER JOIN table2 
ON table1.column_name=table2.column_name;
SQL FULL OUTER JOIN Keyword 
The FULL OUTER JOIN keyword returns all rows from the left table 
(table1) and from the right table (table2). 
The FULL OUTER JOIN keyword combines the result of both LEFT and 
RIGHT joins. 
SQL FULL OUTER JOIN Syntax 
SELECT column_name(s) 
FROM table1 
FULL OUTER JOIN table2 
ON table1.column_name=table2.column_name;
SQL LEFT JOIN Keyword 
The LEFT JOIN keyword returns all rows from the left table 
(table1), with the matching rows in the right table (table2). The 
result is NULL in the right side when there is no match. 
SQL LEFT JOIN Syntax 
SELECT column_name(s) 
FROM table1 
LEFT JOIN table2 
ON table1.column_name=table2.column_name;
SQL RIGHT JOIN Keyword 
The RIGHT JOIN keyword returns all rows from the right table 
(table2), with the matching rows in the left table (table1). The result 
is NULL in the left side when there is no match. 
SQL RIGHT JOIN Syntax 
SELECT column_name(s) 
FROM table1 
RIGHT JOIN table2 
ON table1.column_name=table2.column_name;
Operators 
What is an Operator in SQL? 
An operator is a reserved word or a character used primarily in an SQL 
statement's WHERE clause to perform operation(s), such as 
comparisons and arithmetic operations. 
Operators are used to specify conditions in an SQL 
statement and to serve as conjunctions for multiple 
conditions in a statement. 
• Arithmetic operators (+,*,/,-...) 
• Comparison operators (=,!=,<>,>,<,>=.......) 
• Logical operators
example for logical operators 
ALL 
The ALL operator is used to compare a value to all values in another value set. 
AND 
The AND operator allows the existence of multiple conditions in an SQL statement's WHERE clause. 
ANY 
The ANY operator is used to compare a value to any applicable value in the list according to the 
condition. 
BETWEEN 
The BETWEEN operator is used to search for values that are within a set of values, given the minimum 
value and the maximum value. 
OR 
The OR operator is used to combine multiple conditions in an SQL statement's WHERE clause. 
IS NULL 
The NULL operator is used to compare a value with a NULL value. 
UNIQUE 
The UNIQUE operator searches every row of a specified table for uniqueness (no duplicates). 
for example.... 
SELECT * FROM Products 
WHERE Price BETWEEN 10 AND 20;
THANK 
YOU
Disclaimer: This presentation is prepared by trainees of 
baabtra.com as a part of mentoring program. This is not 
official document of baabtra.com – Mentoring Partner
Want to learn more about programming or Looking to become a good programmer? 
Are you wasting time on searching so many contents online? 
Do you want to learn things quickly? 
Tired of spending huge amount of money to become a Software professional? 
Do an online course 
@ baabtra.com 
We put industry standards to practice. Our structured, activity based courses are so designed 
to make a quick, good software professional out of anybody who holds a passion for coding.
Follow us @ twitter.com/baabtra 
Like us @ facebook.com/baabtra 
Subscribe to us @ youtube.com/baabtra 
Become a follower @ slideshare.net/BaabtraMentoringPartner 
Connect to us @ in.linkedin.com/in/baabtra 
Give a feedback @ massbaab.com/baabtra 
Thanks in advance 
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us 
Emarald Mall (Big Bazar Building) 
Mavoor Road, Kozhikode, 
Kerala, India. 
Ph: + 91 – 495 40 25 550 
NC Complex, Near Bus Stand 
Mukkam, Kozhikode, 
Kerala, India. 
Ph: + 91 – 495 40 25 550 
Cafit Square, 
Hilite Business Park, 
Near Pantheerankavu, 
Kozhikode 
Start up Village 
Eranakulam, 
Kerala, India. 
Email: info@baabtra.com

More Related Content

What's hot

Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)Ishucs
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraintsmadhav bansal
 
Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraintsVivek Singh
 
PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaEdureka!
 
Database normalization
Database normalizationDatabase normalization
Database normalizationEdward Blurock
 
SQL : Structured Query Language
SQL : Structured Query LanguageSQL : Structured Query Language
SQL : Structured Query LanguageAbhishek Gautam
 
Basic SQL Statments
Basic SQL StatmentsBasic SQL Statments
Basic SQL StatmentsUmair Shakir
 
Sql ch 9 - data integrity
Sql ch 9 - data integritySql ch 9 - data integrity
Sql ch 9 - data integrityMukesh Tekwani
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Eddyzulham Mahluzydde
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functionsfarwa waqar
 
Database queries
Database queriesDatabase queries
Database queriesIIUM
 

What's hot (18)

Sql basics
Sql  basicsSql  basics
Sql basics
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
 
Sql select
Sql select Sql select
Sql select
 
12 SQL
12 SQL12 SQL
12 SQL
 
Integrity Constraints
Integrity ConstraintsIntegrity Constraints
Integrity Constraints
 
Sql integrity constraints
Sql integrity constraintsSql integrity constraints
Sql integrity constraints
 
PostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | EdurekaPostgreSQL Tutorial for Beginners | Edureka
PostgreSQL Tutorial for Beginners | Edureka
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
SQL : Structured Query Language
SQL : Structured Query LanguageSQL : Structured Query Language
SQL : Structured Query Language
 
Basic SQL Statments
Basic SQL StatmentsBasic SQL Statments
Basic SQL Statments
 
Dbms relational data model and sql queries
Dbms relational data model and sql queries Dbms relational data model and sql queries
Dbms relational data model and sql queries
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
 
Sql ch 9 - data integrity
Sql ch 9 - data integritySql ch 9 - data integrity
Sql ch 9 - data integrity
 
Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1Chapter 2 Relational Data Model-part1
Chapter 2 Relational Data Model-part1
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Database queries
Database queriesDatabase queries
Database queries
 

Similar to Statements,joins and operators in sql by thanveer danish melayi(1)

Structure Query Language (SQL).pptx
Structure Query Language (SQL).pptxStructure Query Language (SQL).pptx
Structure Query Language (SQL).pptxNalinaKumari2
 
Structure query language (sql)
Structure query language (sql)Structure query language (sql)
Structure query language (sql)Nalina Kumari
 
Data Manipulation Language.pptx
Data Manipulation Language.pptxData Manipulation Language.pptx
Data Manipulation Language.pptxEllenGracePorras
 
DATABASE MANAGMENT SYSTEM (DBMS) AND SQL
DATABASE MANAGMENT SYSTEM (DBMS) AND SQLDATABASE MANAGMENT SYSTEM (DBMS) AND SQL
DATABASE MANAGMENT SYSTEM (DBMS) AND SQLDev Chauhan
 
Advanced Sql Training
Advanced Sql TrainingAdvanced Sql Training
Advanced Sql Trainingbixxman
 
SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive TechandMate
 
SQL and Integrity Constraints (2).pptx
SQL and Integrity Constraints (2).pptxSQL and Integrity Constraints (2).pptx
SQL and Integrity Constraints (2).pptxDeepakMishra195232
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic ConceptsTony Wong
 
chapter-14-sql-commands.pdf
chapter-14-sql-commands.pdfchapter-14-sql-commands.pdf
chapter-14-sql-commands.pdfstudy material
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowPavithSingh
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfDraguClaudiu
 

Similar to Statements,joins and operators in sql by thanveer danish melayi(1) (20)

Mysql
MysqlMysql
Mysql
 
Sql 2006
Sql 2006Sql 2006
Sql 2006
 
ADVANCE ITT BY PRASAD
ADVANCE ITT BY PRASADADVANCE ITT BY PRASAD
ADVANCE ITT BY PRASAD
 
Structure Query Language (SQL).pptx
Structure Query Language (SQL).pptxStructure Query Language (SQL).pptx
Structure Query Language (SQL).pptx
 
Structure query language (sql)
Structure query language (sql)Structure query language (sql)
Structure query language (sql)
 
Data Manipulation Language.pptx
Data Manipulation Language.pptxData Manipulation Language.pptx
Data Manipulation Language.pptx
 
DATABASE MANAGMENT SYSTEM (DBMS) AND SQL
DATABASE MANAGMENT SYSTEM (DBMS) AND SQLDATABASE MANAGMENT SYSTEM (DBMS) AND SQL
DATABASE MANAGMENT SYSTEM (DBMS) AND SQL
 
Dbms
DbmsDbms
Dbms
 
Advanced Sql Training
Advanced Sql TrainingAdvanced Sql Training
Advanced Sql Training
 
SQL Server Learning Drive
SQL Server Learning Drive SQL Server Learning Drive
SQL Server Learning Drive
 
Adbms
AdbmsAdbms
Adbms
 
SQL and Integrity Constraints (2).pptx
SQL and Integrity Constraints (2).pptxSQL and Integrity Constraints (2).pptx
SQL and Integrity Constraints (2).pptx
 
Database Architecture and Basic Concepts
Database Architecture and Basic ConceptsDatabase Architecture and Basic Concepts
Database Architecture and Basic Concepts
 
Lab1 select statement
Lab1 select statementLab1 select statement
Lab1 select statement
 
chapter-14-sql-commands.pdf
chapter-14-sql-commands.pdfchapter-14-sql-commands.pdf
chapter-14-sql-commands.pdf
 
12 SQL
12 SQL12 SQL
12 SQL
 
Interview Questions.pdf
Interview Questions.pdfInterview Questions.pdf
Interview Questions.pdf
 
SQL Query
SQL QuerySQL Query
SQL Query
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good know
 
SQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdfSQL -Beginner To Intermediate Level.pdf
SQL -Beginner To Intermediate Level.pdf
 

More from Muhammed Thanveer M

Easy check is simple and easy use lodge management system
Easy check is simple and easy use lodge management systemEasy check is simple and easy use lodge management system
Easy check is simple and easy use lodge management systemMuhammed Thanveer M
 
KeyBan....easy to think and work
KeyBan....easy to think and workKeyBan....easy to think and work
KeyBan....easy to think and workMuhammed Thanveer M
 
mysql ....question and answer by muhammed thanveer melayi
mysql ....question and answer by muhammed thanveer melayimysql ....question and answer by muhammed thanveer melayi
mysql ....question and answer by muhammed thanveer melayiMuhammed Thanveer M
 
Stored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayiStored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayiMuhammed Thanveer M
 
Udf&views in sql...by thanveer melayi
Udf&views in sql...by thanveer melayiUdf&views in sql...by thanveer melayi
Udf&views in sql...by thanveer melayiMuhammed Thanveer M
 
Functions with heap and stack....by thanveer danish
Functions with heap and stack....by thanveer danishFunctions with heap and stack....by thanveer danish
Functions with heap and stack....by thanveer danishMuhammed Thanveer M
 
Elements of c program....by thanveer danish
Elements of c program....by thanveer danishElements of c program....by thanveer danish
Elements of c program....by thanveer danishMuhammed Thanveer M
 
Aptitude model by thanveer danish
Aptitude model by thanveer danishAptitude model by thanveer danish
Aptitude model by thanveer danishMuhammed Thanveer M
 
Preprocesser in c++ by thanveer danish
Preprocesser in c++ by thanveer danishPreprocesser in c++ by thanveer danish
Preprocesser in c++ by thanveer danishMuhammed Thanveer M
 
Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiMuhammed Thanveer M
 
Understanding c file handling functions with examples
Understanding c file handling functions with examplesUnderstanding c file handling functions with examples
Understanding c file handling functions with examplesMuhammed Thanveer M
 

More from Muhammed Thanveer M (20)

Easy check is simple and easy use lodge management system
Easy check is simple and easy use lodge management systemEasy check is simple and easy use lodge management system
Easy check is simple and easy use lodge management system
 
KEYBAN...MODULES
KEYBAN...MODULES KEYBAN...MODULES
KEYBAN...MODULES
 
KeyBan....easy to think and work
KeyBan....easy to think and workKeyBan....easy to think and work
KeyBan....easy to think and work
 
Codeinator
CodeinatorCodeinator
Codeinator
 
mysql ....question and answer by muhammed thanveer melayi
mysql ....question and answer by muhammed thanveer melayimysql ....question and answer by muhammed thanveer melayi
mysql ....question and answer by muhammed thanveer melayi
 
Jvm
JvmJvm
Jvm
 
Transation.....thanveeer
Transation.....thanveeerTransation.....thanveeer
Transation.....thanveeer
 
Stored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayiStored procedures by thanveer danish melayi
Stored procedures by thanveer danish melayi
 
Udf&views in sql...by thanveer melayi
Udf&views in sql...by thanveer melayiUdf&views in sql...by thanveer melayi
Udf&views in sql...by thanveer melayi
 
Aptitude Questions-2
Aptitude Questions-2Aptitude Questions-2
Aptitude Questions-2
 
The basics of c programming
The basics of c programmingThe basics of c programming
The basics of c programming
 
Preprocesser in c
Preprocesser in cPreprocesser in c
Preprocesser in c
 
Functions with heap and stack....by thanveer danish
Functions with heap and stack....by thanveer danishFunctions with heap and stack....by thanveer danish
Functions with heap and stack....by thanveer danish
 
Elements of c program....by thanveer danish
Elements of c program....by thanveer danishElements of c program....by thanveer danish
Elements of c program....by thanveer danish
 
Aptitude model by thanveer danish
Aptitude model by thanveer danishAptitude model by thanveer danish
Aptitude model by thanveer danish
 
Preprocesser in c++ by thanveer danish
Preprocesser in c++ by thanveer danishPreprocesser in c++ by thanveer danish
Preprocesser in c++ by thanveer danish
 
Data base by thanveer danish
Data base by thanveer danishData base by thanveer danish
Data base by thanveer danish
 
Oop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer MelayiOop concept in c++ by MUhammed Thanveer Melayi
Oop concept in c++ by MUhammed Thanveer Melayi
 
Memory allocation in c
Memory allocation in cMemory allocation in c
Memory allocation in c
 
Understanding c file handling functions with examples
Understanding c file handling functions with examplesUnderstanding c file handling functions with examples
Understanding c file handling functions with examples
 

Recently uploaded

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 

Recently uploaded (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 

Statements,joins and operators in sql by thanveer danish melayi(1)

  • 1.
  • 2. sql statements,operators and joins typing speed:25 Muhammed Thanveer Melayi Muhammedthanveermelayi@outlook.com Muhammed Thanveer Danish Melayi Muhammed Thanveer M
  • 3. • different type of statements 1.DML 2.DDL 3.DCL
  • 4. DML DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database. Examples: SELECT, UPDATE, INSERT statements
  • 5. SYNTAX OF INSERT INTO INSERT INTO table_name (column1,column2,column3,...) VALUES (value1,value2,value3,...); INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country) VALUES ('Cardinal','Tom B. Erichsen','Skagen 21','Stavanger','4006','Norway');
  • 6. DDL DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database. Examples: CREATE, ALTER, DROP statements
  • 7. SYNTAX OF CREATE CREATE TABLE table_name ( column_name1 data_type(size), column_name2 data_type(size), column_name3 data_type(size), .... ); CREATE TABLE Persons ( PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255) );
  • 8. DCL DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it. Examples: GRANT, REVOKE statements • GRANT - gives user's access privileges to database • REVOKE - withdraw access privileges given with the GRANT command
  • 9. GRANT privilege_name ON object_name TO {user_name |PUBLIC • privilege_name is the access right or privilege granted to the user. Some of the access rights are ALL, EXECUTE, and SELECT. • object_name is the name of an database object like TABLE, VIEW, STORED PROC and SEQUENCE. • user_name is the name of the user to whom an access right is being granted. • PUBLIC is used to grant access rights to all users. • ROLES are a set of privileges grouped together. • WITH GRANT OPTION - allows a user to grant access rights to other users. |role_name} [WITH GRANT OPTION];
  • 10. SYNTAX OF REVOKE REVOKE privilege_name ON object_name FROM {user_name |PUBLIC |role_name}
  • 11. example for grant grant select --granting select privilege on emp to public --you can give username at the place of public example for revoke revoke select--removing select privilege on emp from public
  • 12. Joins SQL JOIN clause is used to combine rows from two or more tables, based on a common field between them. 1.inner join 2.full join 3.left join 4.right join
  • 13. SQL INNER JOIN Keyword The INNER JOIN keyword selects all rows from both tables as long as there is a match between the columns in both tables. SQL INNER JOIN Syntax SELECT column_name(s) FROM table1 INNER JOIN table2 ON table1.column_name=table2.column_name;
  • 14. SQL FULL OUTER JOIN Keyword The FULL OUTER JOIN keyword returns all rows from the left table (table1) and from the right table (table2). The FULL OUTER JOIN keyword combines the result of both LEFT and RIGHT joins. SQL FULL OUTER JOIN Syntax SELECT column_name(s) FROM table1 FULL OUTER JOIN table2 ON table1.column_name=table2.column_name;
  • 15. SQL LEFT JOIN Keyword The LEFT JOIN keyword returns all rows from the left table (table1), with the matching rows in the right table (table2). The result is NULL in the right side when there is no match. SQL LEFT JOIN Syntax SELECT column_name(s) FROM table1 LEFT JOIN table2 ON table1.column_name=table2.column_name;
  • 16. SQL RIGHT JOIN Keyword The RIGHT JOIN keyword returns all rows from the right table (table2), with the matching rows in the left table (table1). The result is NULL in the left side when there is no match. SQL RIGHT JOIN Syntax SELECT column_name(s) FROM table1 RIGHT JOIN table2 ON table1.column_name=table2.column_name;
  • 17. Operators What is an Operator in SQL? An operator is a reserved word or a character used primarily in an SQL statement's WHERE clause to perform operation(s), such as comparisons and arithmetic operations. Operators are used to specify conditions in an SQL statement and to serve as conjunctions for multiple conditions in a statement. • Arithmetic operators (+,*,/,-...) • Comparison operators (=,!=,<>,>,<,>=.......) • Logical operators
  • 18. example for logical operators ALL The ALL operator is used to compare a value to all values in another value set. AND The AND operator allows the existence of multiple conditions in an SQL statement's WHERE clause. ANY The ANY operator is used to compare a value to any applicable value in the list according to the condition. BETWEEN The BETWEEN operator is used to search for values that are within a set of values, given the minimum value and the maximum value. OR The OR operator is used to combine multiple conditions in an SQL statement's WHERE clause. IS NULL The NULL operator is used to compare a value with a NULL value. UNIQUE The UNIQUE operator searches every row of a specified table for uniqueness (no duplicates). for example.... SELECT * FROM Products WHERE Price BETWEEN 10 AND 20;
  • 20. Disclaimer: This presentation is prepared by trainees of baabtra.com as a part of mentoring program. This is not official document of baabtra.com – Mentoring Partner
  • 21. Want to learn more about programming or Looking to become a good programmer? Are you wasting time on searching so many contents online? Do you want to learn things quickly? Tired of spending huge amount of money to become a Software professional? Do an online course @ baabtra.com We put industry standards to practice. Our structured, activity based courses are so designed to make a quick, good software professional out of anybody who holds a passion for coding.
  • 22. Follow us @ twitter.com/baabtra Like us @ facebook.com/baabtra Subscribe to us @ youtube.com/baabtra Become a follower @ slideshare.net/BaabtraMentoringPartner Connect to us @ in.linkedin.com/in/baabtra Give a feedback @ massbaab.com/baabtra Thanks in advance www.baabtra.com | www.massbaab.com |www.baabte.com
  • 23. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Cafit Square, Hilite Business Park, Near Pantheerankavu, Kozhikode Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com