SlideShare a Scribd company logo
Prof. Neeraj Bhargava
Pooja Dixit
Department of Computer Science
School of Engineering & System Science
MDS, University Ajmer, Rajasthan, India
 The SQL CREATE DATABASE statement is used to create a
new SQL database.
 Syntax
 The basic syntax of this CREATE DATABASE statement is as
follows −
 CREATE DATABASE DatabaseName; Always the database
name should be unique within the RDBMS.
 Example
 If you want to create a new database <testDB>, then the
CREATE DATABASE statement would be as shown below −
 SQL> CREATE DATABASE testDB;Make sure you have the
admin privilege before creating any database. Once a
database is created, you can check it in the list of databases
as follows −
 SQL> SHOW DATABASES;
 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. These 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
 Operators used to negate conditions
SQL Arithmetic Operators
 Assume 'variable a' holds 10 and 'variable b' holds 20, then −
 SQL Comparison Operators
 Assume 'variable a' holds 10 and 'variable b' holds 20, then −
 SQL Logical Operators
 Here is a list of all the logical operators available in SQL.
Sql operator
 And Operator example:
Eg: SELECT * FROM CUSTOMERS WHERE AGE >= 25 AND SALARY >= 6500;
Output
|ID | NAME | AGE | ADDRESS | SALARY |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00
2 rows in set (0.00 sec)
 Or Operator example:
Eg: SELECT * FROM CUSTOMERS WHERE AGE >= 25 OR SALARY >= 6500;
Output
| ID | NAME | AGE | ADDRESS | SALARY |
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
5 rows in set (0.00 sec)
 not Operator example:
Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE IS NOT NULL;
 Like Operator example:
Eg: SQL> SELECT * FROM CUSTOMERS WHERE NAME LIKE 'Ko%';
 IN Operator example:
Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE IN ( 25, 27 );
 Between Operator example:
Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE BETWEEN 25 AND 27;
 Exists Operator example:
Eg: SELECT AGE FROM CUSTOMERS WHERE EXISTS (SELECT AGE
FROM CUSTOMERS WHERE SALARY > 6500);
 ALL Operator example:
Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE > ALL (SELECT
AGE FROM CUSTOMERS WHERE SALARY > 6500);
 ANY Operator example:
Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE > ANY (SELECT
AGE FROM CUSTOMERS WHERE SALARY > 6500);
Operator
Ad

More Related Content

What's hot (20)

Sql operators & functions 3
Sql operators & functions 3Sql operators & functions 3
Sql operators & functions 3
Dr. C.V. Suresh Babu
 
SQL Queries
SQL QueriesSQL Queries
SQL Queries
Nilt1234
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
Shrija Madhu
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
Stewart Rogers
 
SQL.ppt
SQL.pptSQL.ppt
SQL.ppt
Ranjit273515
 
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
FUNCTION DEPENDENCY  AND TYPES & EXAMPLEFUNCTION DEPENDENCY  AND TYPES & EXAMPLE
FUNCTION DEPENDENCY AND TYPES & EXAMPLE
Vraj Patel
 
SQL Views
SQL ViewsSQL Views
SQL Views
baabtra.com - No. 1 supplier of quality freshers
 
introdution to SQL and SQL functions
introdution to SQL and SQL functionsintrodution to SQL and SQL functions
introdution to SQL and SQL functions
farwa waqar
 
Joins And Its Types
Joins And Its TypesJoins And Its Types
Joins And Its Types
Wings Interactive
 
SQL select statement and functions
SQL select statement and functionsSQL select statement and functions
SQL select statement and functions
Vikas Gupta
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
rehaniltifat
 
Using the set operators
Using the set operatorsUsing the set operators
Using the set operators
Syed Zaid Irshad
 
SQL practice questions - set 3
SQL practice questions - set 3SQL practice questions - set 3
SQL practice questions - set 3
Mohd Tousif
 
Subqueries
SubqueriesSubqueries
Subqueries
Randy Riness @ South Puget Sound Community College
 
MySQL Functions
MySQL FunctionsMySQL Functions
MySQL Functions
Compare Infobase Limited
 
Stored procedure
Stored procedureStored procedure
Stored procedure
baabtra.com - No. 1 supplier of quality freshers
 
SQL Functions and Operators
SQL Functions and OperatorsSQL Functions and Operators
SQL Functions and Operators
Mohan Kumar.R
 
SQL commands
SQL commandsSQL commands
SQL commands
GirdharRatne
 
Sql ppt
Sql pptSql ppt
Sql ppt
Anuja Lad
 
5. stored procedure and functions
5. stored procedure and functions5. stored procedure and functions
5. stored procedure and functions
Amrit Kaur
 

Similar to Sql operator (20)

Sub query example with advantage and disadvantages
Sub query example with advantage and disadvantagesSub query example with advantage and disadvantages
Sub query example with advantage and disadvantages
Sarfaraz Ghanta
 
Dbms
DbmsDbms
Dbms
JahnaviBhagat
 
ALL ABOUT SQL AND RDBMS
ALL ABOUT SQL AND RDBMSALL ABOUT SQL AND RDBMS
ALL ABOUT SQL AND RDBMS
gaurav koriya
 
SQL command for daily use ddl dml dcl dql
SQL command for daily use ddl dml dcl dqlSQL command for daily use ddl dml dcl dql
SQL command for daily use ddl dml dcl dql
kashyapdaksh29
 
Complete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdf
Complete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdfComplete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdf
Complete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdf
PreetiKushwah6
 
Chinabankppt
ChinabankpptChinabankppt
Chinabankppt
newrforce
 
Class 8 - Database Programming
Class 8 - Database ProgrammingClass 8 - Database Programming
Class 8 - Database Programming
Ahmed Swilam
 
Database Systems - SQL - DDL Statements (Chapter 3/3)
Database Systems - SQL - DDL Statements (Chapter 3/3)Database Systems - SQL - DDL Statements (Chapter 3/3)
Database Systems - SQL - DDL Statements (Chapter 3/3)
Vidyasagar Mundroy
 
Introduction to MySQL and introduction to basic queries
Introduction to MySQL and introduction to basic queriesIntroduction to MySQL and introduction to basic queries
Introduction to MySQL and introduction to basic queries
anishacotta2
 
Data Manipulation Language.pptx
Data Manipulation Language.pptxData Manipulation Language.pptx
Data Manipulation Language.pptx
EllenGracePorras
 
01 basic orders
01   basic orders01   basic orders
01 basic orders
Soufiane Hakam
 
Lab
LabLab
Lab
neelam_rawat
 
Sql intro
Sql introSql intro
Sql intro
glubox
 
Beginers guide for oracle sql
Beginers guide for oracle sqlBeginers guide for oracle sql
Beginers guide for oracle sql
N.Jagadish Kumar
 
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
PavithSingh
 
Oracle Notes
Oracle NotesOracle Notes
Oracle Notes
Abhishek Sharma
 
Query
QueryQuery
Query
Raj Devaraj
 
Intro to SQL for Beginners
Intro to SQL for BeginnersIntro to SQL for Beginners
Intro to SQL for Beginners
Product School
 
data manipulation language
data manipulation languagedata manipulation language
data manipulation language
JananiSelvaraj10
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
BhupendraShahi6
 
Sub query example with advantage and disadvantages
Sub query example with advantage and disadvantagesSub query example with advantage and disadvantages
Sub query example with advantage and disadvantages
Sarfaraz Ghanta
 
ALL ABOUT SQL AND RDBMS
ALL ABOUT SQL AND RDBMSALL ABOUT SQL AND RDBMS
ALL ABOUT SQL AND RDBMS
gaurav koriya
 
SQL command for daily use ddl dml dcl dql
SQL command for daily use ddl dml dcl dqlSQL command for daily use ddl dml dcl dql
SQL command for daily use ddl dml dcl dql
kashyapdaksh29
 
Complete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdf
Complete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdfComplete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdf
Complete SQL Tutorial In Hindi By Rishabh Mishra (Basic to Advance).pdf
PreetiKushwah6
 
Chinabankppt
ChinabankpptChinabankppt
Chinabankppt
newrforce
 
Class 8 - Database Programming
Class 8 - Database ProgrammingClass 8 - Database Programming
Class 8 - Database Programming
Ahmed Swilam
 
Database Systems - SQL - DDL Statements (Chapter 3/3)
Database Systems - SQL - DDL Statements (Chapter 3/3)Database Systems - SQL - DDL Statements (Chapter 3/3)
Database Systems - SQL - DDL Statements (Chapter 3/3)
Vidyasagar Mundroy
 
Introduction to MySQL and introduction to basic queries
Introduction to MySQL and introduction to basic queriesIntroduction to MySQL and introduction to basic queries
Introduction to MySQL and introduction to basic queries
anishacotta2
 
Data Manipulation Language.pptx
Data Manipulation Language.pptxData Manipulation Language.pptx
Data Manipulation Language.pptx
EllenGracePorras
 
Sql intro
Sql introSql intro
Sql intro
glubox
 
Beginers guide for oracle sql
Beginers guide for oracle sqlBeginers guide for oracle sql
Beginers guide for oracle sql
N.Jagadish Kumar
 
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
PavithSingh
 
Intro to SQL for Beginners
Intro to SQL for BeginnersIntro to SQL for Beginners
Intro to SQL for Beginners
Product School
 
data manipulation language
data manipulation languagedata manipulation language
data manipulation language
JananiSelvaraj10
 
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptxSQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
SQL-Tutorial.P1241112567Pczwq.powerpoint.pptx
BhupendraShahi6
 
Ad

More from Pooja Dixit (20)

Combinational circuit.pptx
Combinational circuit.pptxCombinational circuit.pptx
Combinational circuit.pptx
Pooja Dixit
 
number system.pptx
number system.pptxnumber system.pptx
number system.pptx
Pooja Dixit
 
Multiplexer.pptx
Multiplexer.pptxMultiplexer.pptx
Multiplexer.pptx
Pooja Dixit
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
Pooja Dixit
 
K-Map.pptx
K-Map.pptxK-Map.pptx
K-Map.pptx
Pooja Dixit
 
Karnaugh Map Simplification Rules.pptx
Karnaugh Map Simplification Rules.pptxKarnaugh Map Simplification Rules.pptx
Karnaugh Map Simplification Rules.pptx
Pooja Dixit
 
Half Subtractor.pptx
Half Subtractor.pptxHalf Subtractor.pptx
Half Subtractor.pptx
Pooja Dixit
 
Gray Code.pptx
Gray Code.pptxGray Code.pptx
Gray Code.pptx
Pooja Dixit
 
Flip Flop.pptx
Flip Flop.pptxFlip Flop.pptx
Flip Flop.pptx
Pooja Dixit
 
Encoder.pptx
Encoder.pptxEncoder.pptx
Encoder.pptx
Pooja Dixit
 
De-multiplexer.pptx
De-multiplexer.pptxDe-multiplexer.pptx
De-multiplexer.pptx
Pooja Dixit
 
DeMorgan’s Theory.pptx
DeMorgan’s Theory.pptxDeMorgan’s Theory.pptx
DeMorgan’s Theory.pptx
Pooja Dixit
 
Combinational circuit.pptx
Combinational circuit.pptxCombinational circuit.pptx
Combinational circuit.pptx
Pooja Dixit
 
Boolean Algebra.pptx
Boolean Algebra.pptxBoolean Algebra.pptx
Boolean Algebra.pptx
Pooja Dixit
 
Binary Multiplication & Division.pptx
Binary Multiplication & Division.pptxBinary Multiplication & Division.pptx
Binary Multiplication & Division.pptx
Pooja Dixit
 
Binary addition.pptx
Binary addition.pptxBinary addition.pptx
Binary addition.pptx
Pooja Dixit
 
Basics of Computer Organization.pptx
Basics of Computer Organization.pptxBasics of Computer Organization.pptx
Basics of Computer Organization.pptx
Pooja Dixit
 
Decoders
DecodersDecoders
Decoders
Pooja Dixit
 
Three Address code
Three Address code Three Address code
Three Address code
Pooja Dixit
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
Pooja Dixit
 
Combinational circuit.pptx
Combinational circuit.pptxCombinational circuit.pptx
Combinational circuit.pptx
Pooja Dixit
 
number system.pptx
number system.pptxnumber system.pptx
number system.pptx
Pooja Dixit
 
Multiplexer.pptx
Multiplexer.pptxMultiplexer.pptx
Multiplexer.pptx
Pooja Dixit
 
Logic Gates.pptx
Logic Gates.pptxLogic Gates.pptx
Logic Gates.pptx
Pooja Dixit
 
Karnaugh Map Simplification Rules.pptx
Karnaugh Map Simplification Rules.pptxKarnaugh Map Simplification Rules.pptx
Karnaugh Map Simplification Rules.pptx
Pooja Dixit
 
Half Subtractor.pptx
Half Subtractor.pptxHalf Subtractor.pptx
Half Subtractor.pptx
Pooja Dixit
 
De-multiplexer.pptx
De-multiplexer.pptxDe-multiplexer.pptx
De-multiplexer.pptx
Pooja Dixit
 
DeMorgan’s Theory.pptx
DeMorgan’s Theory.pptxDeMorgan’s Theory.pptx
DeMorgan’s Theory.pptx
Pooja Dixit
 
Combinational circuit.pptx
Combinational circuit.pptxCombinational circuit.pptx
Combinational circuit.pptx
Pooja Dixit
 
Boolean Algebra.pptx
Boolean Algebra.pptxBoolean Algebra.pptx
Boolean Algebra.pptx
Pooja Dixit
 
Binary Multiplication & Division.pptx
Binary Multiplication & Division.pptxBinary Multiplication & Division.pptx
Binary Multiplication & Division.pptx
Pooja Dixit
 
Binary addition.pptx
Binary addition.pptxBinary addition.pptx
Binary addition.pptx
Pooja Dixit
 
Basics of Computer Organization.pptx
Basics of Computer Organization.pptxBasics of Computer Organization.pptx
Basics of Computer Organization.pptx
Pooja Dixit
 
Three Address code
Three Address code Three Address code
Three Address code
Pooja Dixit
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
Pooja Dixit
 
Ad

Recently uploaded (20)

some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
some basics electrical and electronics knowledge
some basics electrical and electronics knowledgesome basics electrical and electronics knowledge
some basics electrical and electronics knowledge
nguyentrungdo88
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
fluke dealers in bangalore..............
fluke dealers in bangalore..............fluke dealers in bangalore..............
fluke dealers in bangalore..............
Haresh Vaswani
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)International Journal of Distributed and Parallel systems (IJDPS)
International Journal of Distributed and Parallel systems (IJDPS)
samueljackson3773
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Compiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptxCompiler Design_Lexical Analysis phase.pptx
Compiler Design_Lexical Analysis phase.pptx
RushaliDeshmukh2
 
railway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forgingrailway wheels, descaling after reheating and before forging
railway wheels, descaling after reheating and before forging
Javad Kadkhodapour
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 

Sql operator

  • 1. Prof. Neeraj Bhargava Pooja Dixit Department of Computer Science School of Engineering & System Science MDS, University Ajmer, Rajasthan, India
  • 2.  The SQL CREATE DATABASE statement is used to create a new SQL database.  Syntax  The basic syntax of this CREATE DATABASE statement is as follows −  CREATE DATABASE DatabaseName; Always the database name should be unique within the RDBMS.  Example  If you want to create a new database <testDB>, then the CREATE DATABASE statement would be as shown below −  SQL> CREATE DATABASE testDB;Make sure you have the admin privilege before creating any database. Once a database is created, you can check it in the list of databases as follows −  SQL> SHOW DATABASES;
  • 3.  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. These 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  Operators used to negate conditions SQL Arithmetic Operators  Assume 'variable a' holds 10 and 'variable b' holds 20, then −
  • 4.  SQL Comparison Operators  Assume 'variable a' holds 10 and 'variable b' holds 20, then −
  • 5.  SQL Logical Operators  Here is a list of all the logical operators available in SQL.
  • 7.  And Operator example: Eg: SELECT * FROM CUSTOMERS WHERE AGE >= 25 AND SALARY >= 6500; Output |ID | NAME | AGE | ADDRESS | SALARY | | 4 | Chaitali | 25 | Mumbai | 6500.00 | | 5 | Hardik | 27 | Bhopal | 8500.00 2 rows in set (0.00 sec)  Or Operator example: Eg: SELECT * FROM CUSTOMERS WHERE AGE >= 25 OR SALARY >= 6500; Output | ID | NAME | AGE | ADDRESS | SALARY | | 1 | Ramesh | 32 | Ahmedabad | 2000.00 | | 2 | Khilan | 25 | Delhi | 1500.00 | | 4 | Chaitali | 25 | Mumbai | 6500.00 | | 5 | Hardik | 27 | Bhopal | 8500.00 | | 7 | Muffy | 24 | Indore | 10000.00 | 5 rows in set (0.00 sec)  not Operator example: Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE IS NOT NULL;  Like Operator example: Eg: SQL> SELECT * FROM CUSTOMERS WHERE NAME LIKE 'Ko%';  IN Operator example: Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE IN ( 25, 27 );  Between Operator example: Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE BETWEEN 25 AND 27;
  • 8.  Exists Operator example: Eg: SELECT AGE FROM CUSTOMERS WHERE EXISTS (SELECT AGE FROM CUSTOMERS WHERE SALARY > 6500);  ALL Operator example: Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE > ALL (SELECT AGE FROM CUSTOMERS WHERE SALARY > 6500);  ANY Operator example: Eg: SQL> SELECT * FROM CUSTOMERS WHERE AGE > ANY (SELECT AGE FROM CUSTOMERS WHERE SALARY > 6500); Operator