SlideShare uma empresa Scribd logo
1 de 8
Arithmetic operators
• SQL Addition Operator (+)
• SQL Subtraction Operator (-)
• SQL Multiplication Operator (*)
• SQL Division Operator (/)
• SQL Modulus Operator (%)
SQL Addition Operator (+)
• The SQL Addition Operator performs the addition on the numerical
columns in the table.
• If you want to add the values of two numerical columns in the table, then
you have to specify both columns as the first and second operand. You can
also add the new integer value in the value of the integer column.
• SELECT Column_Name_1 Addition_Operator Column_Name2 FROM Table_
Name;
• SELECT Column_Name_1 Addition_Operator Column_Name2 FROM Table_
Name WHERE Condition;
mployee_Id Emp_Name Emp_City Emp_Salary Emp_bonus
101 Anuj Ghaziabad 25000 2000
102 Tushar Lucknow 29000 1000
103 Vivek Kolkata 35000 2500
104 Shivam Goa 22000 3000
SELECT Emp_Salary + Emp_Bonus AS Emp_Total_Salary FROM Employee;
SELECT Emp_Salary + 15000 AS Emp_Updated_Salary FROM Employee;
SELECT Emp_Salary + Emp_Bonus AS Emp_Total_Salary FROM Employee
WHERE Emp_Salary > 25000;
Employee_Id Emp_Name Emp_City Emp_Salary Emp_Panelty
101 Anuj Ghaziabad 25000 500
102 Tushar Lucknow 29000 1000
103 Vivek Kolkata 35000 700
104 Shivam Goa 22000 500
SELECT Emp_Salary - Emp_Panelty AS Emp_Total_Salary FROM Employee;
SELECT Emp_Panelty - Emp_Salary AS Emp_Total_Salary FROM Employee WHERE Employee_ID = 104;
SELECT Emp_Salary - 10000 AS Emp_Updated_Salary FROM Employee;
Car_Number Car_Name Car_Amount Car_Price
2578 Creta 3 1500000
9258 Audi 2 3000000
8233 Venue 6 900000
6214 Nexon 7 1000000
SELECT Car_Amount * Car_Price AS Car_Total_Price FROM Cars;
SELECT Car_Amount * Car_Price AS Car_Total_Price FROM Cars WHERE Car_Price >= 1000000;
SELECT Car_Price / Car_Amount AS One_Car_Price FROM Cars;
Student_Id Student_Name Student_Maths Student_English
201 Anuj 30 60
202 Tushar 25 100
203 Vivek 30 90
204 Shivam 40 80
SELECT Student_English % Student_Maths AS Remainder FROM Student;
11-Arithmetic operators.pptx

Mais conteúdo relacionado

Semelhante a 11-Arithmetic operators.pptx

MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
gilpinleeanna
 

Semelhante a 11-Arithmetic operators.pptx (20)

SQL Notes
SQL NotesSQL Notes
SQL Notes
 
Manipulating data
Manipulating dataManipulating data
Manipulating data
 
Les03 Single Row Function
Les03 Single Row FunctionLes03 Single Row Function
Les03 Single Row Function
 
MYSQL using set operators
MYSQL using set operatorsMYSQL using set operators
MYSQL using set operators
 
Using the set operators
Using the set operatorsUsing the set operators
Using the set operators
 
Les01 Writing Basic Sql Statements
Les01 Writing Basic Sql StatementsLes01 Writing Basic Sql Statements
Les01 Writing Basic Sql Statements
 
Operators in C#
Operators in C#Operators in C#
Operators in C#
 
Operators and Expressions in C++
Operators and Expressions in C++Operators and Expressions in C++
Operators and Expressions in C++
 
C++ chapter 2
C++ chapter 2C++ chapter 2
C++ chapter 2
 
Select To Order By
Select  To  Order BySelect  To  Order By
Select To Order By
 
sql language
sql languagesql language
sql language
 
Introduction to sql_02
Introduction to sql_02Introduction to sql_02
Introduction to sql_02
 
1. dml select statement reterive data
1. dml select statement reterive data1. dml select statement reterive data
1. dml select statement reterive data
 
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
 
Oracle: Joins
Oracle: JoinsOracle: Joins
Oracle: Joins
 
Oracle: Joins
Oracle: JoinsOracle: Joins
Oracle: Joins
 
Les03
Les03Les03
Les03
 
COIS 420 - Practice01
COIS 420 - Practice01COIS 420 - Practice01
COIS 420 - Practice01
 
4sem dbms(1)
4sem dbms(1)4sem dbms(1)
4sem dbms(1)
 
MySQL Training
MySQL TrainingMySQL Training
MySQL Training
 

Último

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Último (20)

Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 

11-Arithmetic operators.pptx

  • 2. • SQL Addition Operator (+) • SQL Subtraction Operator (-) • SQL Multiplication Operator (*) • SQL Division Operator (/) • SQL Modulus Operator (%)
  • 3. SQL Addition Operator (+) • The SQL Addition Operator performs the addition on the numerical columns in the table. • If you want to add the values of two numerical columns in the table, then you have to specify both columns as the first and second operand. You can also add the new integer value in the value of the integer column. • SELECT Column_Name_1 Addition_Operator Column_Name2 FROM Table_ Name; • SELECT Column_Name_1 Addition_Operator Column_Name2 FROM Table_ Name WHERE Condition;
  • 4. mployee_Id Emp_Name Emp_City Emp_Salary Emp_bonus 101 Anuj Ghaziabad 25000 2000 102 Tushar Lucknow 29000 1000 103 Vivek Kolkata 35000 2500 104 Shivam Goa 22000 3000 SELECT Emp_Salary + Emp_Bonus AS Emp_Total_Salary FROM Employee; SELECT Emp_Salary + 15000 AS Emp_Updated_Salary FROM Employee; SELECT Emp_Salary + Emp_Bonus AS Emp_Total_Salary FROM Employee WHERE Emp_Salary > 25000;
  • 5. Employee_Id Emp_Name Emp_City Emp_Salary Emp_Panelty 101 Anuj Ghaziabad 25000 500 102 Tushar Lucknow 29000 1000 103 Vivek Kolkata 35000 700 104 Shivam Goa 22000 500 SELECT Emp_Salary - Emp_Panelty AS Emp_Total_Salary FROM Employee; SELECT Emp_Panelty - Emp_Salary AS Emp_Total_Salary FROM Employee WHERE Employee_ID = 104; SELECT Emp_Salary - 10000 AS Emp_Updated_Salary FROM Employee;
  • 6. Car_Number Car_Name Car_Amount Car_Price 2578 Creta 3 1500000 9258 Audi 2 3000000 8233 Venue 6 900000 6214 Nexon 7 1000000 SELECT Car_Amount * Car_Price AS Car_Total_Price FROM Cars; SELECT Car_Amount * Car_Price AS Car_Total_Price FROM Cars WHERE Car_Price >= 1000000; SELECT Car_Price / Car_Amount AS One_Car_Price FROM Cars;
  • 7. Student_Id Student_Name Student_Maths Student_English 201 Anuj 30 60 202 Tushar 25 100 203 Vivek 30 90 204 Shivam 40 80 SELECT Student_English % Student_Maths AS Remainder FROM Student;