SlideShare una empresa de Scribd logo
1 de 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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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 a 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 a 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
 

Más de 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
 

Más de 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
 

Último

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 

Último (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
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
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 

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