SlideShare a Scribd company logo
1 of 21
By : Dhirendra Chauhan
Numeric
Functions
ABS() Function
“The ABS() function returns the absolute
(positive) value of a number”
Syntax :
Select ABS(number);
Example
Select ABS(-9);
Output: 9
CEIL( ) / CEILING( ) Function
“The CEIL() function returns the smallest integer
value that is bigger than or equal to a number.”
Syntax
SELECT CEIL(number);
Example
SELECT CEIL(25.75);
Output : 26
Example
SELECT CEIL(25.75);
SELECT CEIL(25.00);
SELECT CEIL(-25.01);
SELECT CEIL(-25.99);
Output
26
25
-25
-25
FLOOR( ) Function
“The FLOOR() function returns the largest integer
value that is smaller than or equal to a number.
Syntax
SELECT FLOOR(number);
Example
SELECT FLOOR(25.75);
Output : 25
Example
SELECT Floor(25.75);
SELECT Floor (25.00);
SELECT Floor (-25.01);
SELECT Floor (-25.99);
Output
25
25
-26
-26
MOD( ) Function
“The MOD() function returns the remainder of a number
divided by another number.”
Syntax
SELECT MOD( M , N );
Example
SELECT MOD(18, 4);
Output : 2
POW( )/ POWER() Function
“The POW() function returns the value of a number raised to
the power of another number.”
Syntax:
SELECT POW(x, y);
Example
SELECT POW(4, 2);
Output :
x y
4 2
4 * 4 = 16
ROUND() Function
The ROUND() function rounds a number to a specified
number of decimal places
Syntax:
SELECT ROUND(number, decimals);
Example
SELECT ROUND(135.375, 2);
Example output
1. SELECT ROUND (135.375, 3); 135.375
2. SELECT ROUND (135.375, 2); 135.38
3. SELECT ROUND (135.375, 1); 135.4
4. SELECT ROUND (135.375, 0); 135
5. SELECT ROUND (135.375, -1); 140
6. SELECT ROUND (135.375, -2); 100
7. SELECT ROUND (135.375, -3); 0
TRUNCATE( ) Function
The TRUNCATE() function truncates a number to the
specified number of decimal places.
Syntax:
SELECT TRUNCATE(number, decimals);
Example
SELECT TRUNCATE(135.375, 2);
Example output
1. SELECT TRUNCATE(135.375, 3); 135.375
2. SELECT TRUNCATE(135.375, 2); 135.37
3. SELECT TRUNCATE(135.375, 1); 135.3
4. SELECT TRUNCATE(135.375, 0); 135
5. SELECT TRUNCATE(135.375, -1); 130
6. SELECT TRUNCATE(135.375, -2); 10
7. SELECT TRUNCATE(135.375, -3); 0
SQRT() Function
The SQRT() function returns the square root of a number.
Syntax:
SELECT SQRT(Number);
Example
SELECT SQRT(9);
Output : 3
SIGN() Function
The SIGN() function returns the sign of a number.
This function will return one of the following:
If number > 0, it returns 1
If number = 0, it returns 0
If number < 0, it returns -1
Syntax Example
SELECT SIGN(Number); SELECT SIGN(255.5);
Output : 1
RAND() Function
The RAND() function returns a random number between 0
(inclusive) and 1 (exclusive)
Syntax:
SELECT RAND(Number);
Example
SELECT RAND(5);
Output : 0.4
RADIANS() Function
The RADIANS() function converts a degree value
into radians.
Syntax:
SELECT RADIANS(Number);
Example
SELECT RADIANS(180);
Output : 3.14
DEGREES( ) Function
“The DEGREES() function converts a value in radians
to degrees.
Syntax
SELECT DEGREES(radians);
Example
SELECT DEGREES(1.5);
Output : 85.95
GREATEST() Function
The GREATEST() function returns the greatest value of the
list of arguments
Syntax:
SELECT GREATEST (arg1, arg2, arg3, ...);
Example
SELECT GREATEST(3, 12, 34, 8, 25);
Output : 34
LEAST( ) Function
The LEAST() function returns the smallest value of the list
of arguments.
Syntax
SELECT LEAST(arg1, arg2, arg3, ...);
Example
SELECT LEAST(3, 12, 34, 8, 25);
Output : 3
THANK
YOU

More Related Content

What's hot

What's hot (20)

week-1x
week-1xweek-1x
week-1x
 
week-6x
week-6xweek-6x
week-6x
 
C Programming Language Part 4
C Programming Language Part 4C Programming Language Part 4
C Programming Language Part 4
 
week-11x
week-11xweek-11x
week-11x
 
C Programming Language Step by Step Part 5
C Programming Language Step by Step Part 5C Programming Language Step by Step Part 5
C Programming Language Step by Step Part 5
 
Lecture#5 Operators in C++
Lecture#5 Operators in C++Lecture#5 Operators in C++
Lecture#5 Operators in C++
 
week-10x
week-10xweek-10x
week-10x
 
Mathematics Function in C ,ppt
Mathematics Function in C ,pptMathematics Function in C ,ppt
Mathematics Function in C ,ppt
 
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
 
Advanced pointer
Advanced pointerAdvanced pointer
Advanced pointer
 
Expression evaluation
Expression evaluationExpression evaluation
Expression evaluation
 
Stack using Linked List
Stack using Linked ListStack using Linked List
Stack using Linked List
 
Built in functions
Built in functionsBuilt in functions
Built in functions
 
week-18x
week-18xweek-18x
week-18x
 
Application of Stacks
Application of StacksApplication of Stacks
Application of Stacks
 
Simple C programs
Simple C programsSimple C programs
Simple C programs
 
Sketching derivatives
Sketching derivativesSketching derivatives
Sketching derivatives
 
matlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequencesmatlab code of shifting and folding of two sequences
matlab code of shifting and folding of two sequences
 
Lec21-CS110 Computational Engineering
Lec21-CS110 Computational EngineeringLec21-CS110 Computational Engineering
Lec21-CS110 Computational Engineering
 
High Order Function Computations in c++14 (C++ Dev Meetup Iasi)
High Order Function Computations in c++14 (C++ Dev Meetup Iasi)High Order Function Computations in c++14 (C++ Dev Meetup Iasi)
High Order Function Computations in c++14 (C++ Dev Meetup Iasi)
 

Similar to V34 numeric function-c

Structured query language functions
Structured query language functionsStructured query language functions
Structured query language functionsVineeta Garg
 
Database Query Using SQL_ip.docx
Database Query Using SQL_ip.docxDatabase Query Using SQL_ip.docx
Database Query Using SQL_ip.docxVandanaGoyal21
 
Intro to tsql unit 10
Intro to tsql   unit 10Intro to tsql   unit 10
Intro to tsql unit 10Syed Asrarali
 
SQL Functions and Operators
SQL Functions and OperatorsSQL Functions and Operators
SQL Functions and OperatorsMohan Kumar.R
 
Sql intro
Sql introSql intro
Sql introglubox
 
The IoT Academy IoT Training Arduino Part 3 programming
The IoT Academy IoT Training Arduino Part 3 programmingThe IoT Academy IoT Training Arduino Part 3 programming
The IoT Academy IoT Training Arduino Part 3 programmingThe IOT Academy
 
Unit 3 - Function & Grouping,Joins and Set Operations in ORACLE
Unit 3 - Function & Grouping,Joins and Set Operations in ORACLEUnit 3 - Function & Grouping,Joins and Set Operations in ORACLE
Unit 3 - Function & Grouping,Joins and Set Operations in ORACLEDrkhanchanaR
 
Developer Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duoDeveloper Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duoThe Software House
 
MS SQLSERVER:Doing Calculations With Functions
MS SQLSERVER:Doing Calculations With FunctionsMS SQLSERVER:Doing Calculations With Functions
MS SQLSERVER:Doing Calculations With Functionssqlserver content
 
MS SQL SERVER: Doing Calculations With Functions
MS SQL SERVER: Doing Calculations With FunctionsMS SQL SERVER: Doing Calculations With Functions
MS SQL SERVER: Doing Calculations With Functionssqlserver content
 
MS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With FunctionsMS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With FunctionsDataminingTools Inc
 
MySQL-commands.pdf
MySQL-commands.pdfMySQL-commands.pdf
MySQL-commands.pdfssuserc5aa74
 
The Ring programming language version 1.7 book - Part 30 of 196
The Ring programming language version 1.7 book - Part 30 of 196The Ring programming language version 1.7 book - Part 30 of 196
The Ring programming language version 1.7 book - Part 30 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 16 of 84
The Ring programming language version 1.2 book - Part 16 of 84The Ring programming language version 1.2 book - Part 16 of 84
The Ring programming language version 1.2 book - Part 16 of 84Mahmoud Samir Fayed
 

Similar to V34 numeric function-c (20)

Structured query language functions
Structured query language functionsStructured query language functions
Structured query language functions
 
Database Query Using SQL_ip.docx
Database Query Using SQL_ip.docxDatabase Query Using SQL_ip.docx
Database Query Using SQL_ip.docx
 
Intro to tsql unit 10
Intro to tsql   unit 10Intro to tsql   unit 10
Intro to tsql unit 10
 
Les03
Les03Les03
Les03
 
SQL Functions and Operators
SQL Functions and OperatorsSQL Functions and Operators
SQL Functions and Operators
 
Computer practical
Computer practicalComputer practical
Computer practical
 
Sql intro
Sql introSql intro
Sql intro
 
The IoT Academy IoT Training Arduino Part 3 programming
The IoT Academy IoT Training Arduino Part 3 programmingThe IoT Academy IoT Training Arduino Part 3 programming
The IoT Academy IoT Training Arduino Part 3 programming
 
ORACLE NOTES
ORACLE NOTESORACLE NOTES
ORACLE NOTES
 
Unit 3 - Function & Grouping,Joins and Set Operations in ORACLE
Unit 3 - Function & Grouping,Joins and Set Operations in ORACLEUnit 3 - Function & Grouping,Joins and Set Operations in ORACLE
Unit 3 - Function & Grouping,Joins and Set Operations in ORACLE
 
Developer Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duoDeveloper Experience i TypeScript. Najbardziej ikoniczne duo
Developer Experience i TypeScript. Najbardziej ikoniczne duo
 
Les03 Single Row Function
Les03 Single Row FunctionLes03 Single Row Function
Les03 Single Row Function
 
MS SQLSERVER:Doing Calculations With Functions
MS SQLSERVER:Doing Calculations With FunctionsMS SQLSERVER:Doing Calculations With Functions
MS SQLSERVER:Doing Calculations With Functions
 
MS SQL SERVER: Doing Calculations With Functions
MS SQL SERVER: Doing Calculations With FunctionsMS SQL SERVER: Doing Calculations With Functions
MS SQL SERVER: Doing Calculations With Functions
 
MS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With FunctionsMS Sql Server: Doing Calculations With Functions
MS Sql Server: Doing Calculations With Functions
 
MySQL-commands.pdf
MySQL-commands.pdfMySQL-commands.pdf
MySQL-commands.pdf
 
Sql operators & functions 3
Sql operators & functions 3Sql operators & functions 3
Sql operators & functions 3
 
The Ring programming language version 1.7 book - Part 30 of 196
The Ring programming language version 1.7 book - Part 30 of 196The Ring programming language version 1.7 book - Part 30 of 196
The Ring programming language version 1.7 book - Part 30 of 196
 
SQL Keywords
SQL KeywordsSQL Keywords
SQL Keywords
 
The Ring programming language version 1.2 book - Part 16 of 84
The Ring programming language version 1.2 book - Part 16 of 84The Ring programming language version 1.2 book - Part 16 of 84
The Ring programming language version 1.2 book - Part 16 of 84
 

More from Dhirendra Chauhan (20)

V35 keys-c
V35  keys-cV35  keys-c
V35 keys-c
 
V33 date function-c
V33  date function-cV33  date function-c
V33 date function-c
 
V31 having
V31  havingV31  having
V31 having
 
V30 full join(union intersect etc)
V30  full join(union intersect etc)V30  full join(union intersect etc)
V30 full join(union intersect etc)
 
V29 group by-c
V29  group by-cV29  group by-c
V29 group by-c
 
V28 view
V28  viewV28  view
V28 view
 
V27 constraint
V27 constraintV27 constraint
V27 constraint
 
V26 key
V26 keyV26 key
V26 key
 
V25 sql index
V25 sql indexV25 sql index
V25 sql index
 
V24 cartesion product-c
V24 cartesion product-cV24 cartesion product-c
V24 cartesion product-c
 
V23 function-2
V23 function-2V23 function-2
V23 function-2
 
V22 function-1
V22 function-1V22 function-1
V22 function-1
 
V21 in operator
V21 in operatorV21 in operator
V21 in operator
 
V20 bet ween operator-c
V20 bet ween operator-cV20 bet ween operator-c
V20 bet ween operator-c
 
V19 join method-c
V19 join method-cV19 join method-c
V19 join method-c
 
V18 alias-c
V18 alias-cV18 alias-c
V18 alias-c
 
V17 show command-c
V17 show command-cV17 show command-c
V17 show command-c
 
V16 sql comments-c
V16 sql comments-cV16 sql comments-c
V16 sql comments-c
 
V15 like operator-c
V15 like operator-cV15 like operator-c
V15 like operator-c
 
V3 employment-unemployment
V3 employment-unemploymentV3 employment-unemployment
V3 employment-unemployment
 

Recently uploaded

CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 

Recently uploaded (20)

CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 

V34 numeric function-c

  • 1. By : Dhirendra Chauhan
  • 3. ABS() Function “The ABS() function returns the absolute (positive) value of a number” Syntax : Select ABS(number); Example Select ABS(-9); Output: 9
  • 4. CEIL( ) / CEILING( ) Function “The CEIL() function returns the smallest integer value that is bigger than or equal to a number.” Syntax SELECT CEIL(number); Example SELECT CEIL(25.75); Output : 26
  • 5. Example SELECT CEIL(25.75); SELECT CEIL(25.00); SELECT CEIL(-25.01); SELECT CEIL(-25.99); Output 26 25 -25 -25
  • 6. FLOOR( ) Function “The FLOOR() function returns the largest integer value that is smaller than or equal to a number. Syntax SELECT FLOOR(number); Example SELECT FLOOR(25.75); Output : 25
  • 7. Example SELECT Floor(25.75); SELECT Floor (25.00); SELECT Floor (-25.01); SELECT Floor (-25.99); Output 25 25 -26 -26
  • 8. MOD( ) Function “The MOD() function returns the remainder of a number divided by another number.” Syntax SELECT MOD( M , N ); Example SELECT MOD(18, 4); Output : 2
  • 9. POW( )/ POWER() Function “The POW() function returns the value of a number raised to the power of another number.” Syntax: SELECT POW(x, y); Example SELECT POW(4, 2); Output : x y 4 2 4 * 4 = 16
  • 10. ROUND() Function The ROUND() function rounds a number to a specified number of decimal places Syntax: SELECT ROUND(number, decimals); Example SELECT ROUND(135.375, 2);
  • 11. Example output 1. SELECT ROUND (135.375, 3); 135.375 2. SELECT ROUND (135.375, 2); 135.38 3. SELECT ROUND (135.375, 1); 135.4 4. SELECT ROUND (135.375, 0); 135 5. SELECT ROUND (135.375, -1); 140 6. SELECT ROUND (135.375, -2); 100 7. SELECT ROUND (135.375, -3); 0
  • 12. TRUNCATE( ) Function The TRUNCATE() function truncates a number to the specified number of decimal places. Syntax: SELECT TRUNCATE(number, decimals); Example SELECT TRUNCATE(135.375, 2);
  • 13. Example output 1. SELECT TRUNCATE(135.375, 3); 135.375 2. SELECT TRUNCATE(135.375, 2); 135.37 3. SELECT TRUNCATE(135.375, 1); 135.3 4. SELECT TRUNCATE(135.375, 0); 135 5. SELECT TRUNCATE(135.375, -1); 130 6. SELECT TRUNCATE(135.375, -2); 10 7. SELECT TRUNCATE(135.375, -3); 0
  • 14. SQRT() Function The SQRT() function returns the square root of a number. Syntax: SELECT SQRT(Number); Example SELECT SQRT(9); Output : 3
  • 15. SIGN() Function The SIGN() function returns the sign of a number. This function will return one of the following: If number > 0, it returns 1 If number = 0, it returns 0 If number < 0, it returns -1 Syntax Example SELECT SIGN(Number); SELECT SIGN(255.5); Output : 1
  • 16. RAND() Function The RAND() function returns a random number between 0 (inclusive) and 1 (exclusive) Syntax: SELECT RAND(Number); Example SELECT RAND(5); Output : 0.4
  • 17. RADIANS() Function The RADIANS() function converts a degree value into radians. Syntax: SELECT RADIANS(Number); Example SELECT RADIANS(180); Output : 3.14
  • 18. DEGREES( ) Function “The DEGREES() function converts a value in radians to degrees. Syntax SELECT DEGREES(radians); Example SELECT DEGREES(1.5); Output : 85.95
  • 19. GREATEST() Function The GREATEST() function returns the greatest value of the list of arguments Syntax: SELECT GREATEST (arg1, arg2, arg3, ...); Example SELECT GREATEST(3, 12, 34, 8, 25); Output : 34
  • 20. LEAST( ) Function The LEAST() function returns the smallest value of the list of arguments. Syntax SELECT LEAST(arg1, arg2, arg3, ...); Example SELECT LEAST(3, 12, 34, 8, 25); Output : 3