See Our team

Wondering how we keep quality?

Got unsolved questions?

Ask Questions

Engineering
GATE
CBSE
NCERT
Psychology
English
Computer
Constitution
Astrology
Yoga
Economics
Physics
Biology
Electronics
Microprocessor
Career
Interview
Anatomy
Botany

## Differentiate between the mathematical function Truncate(x) and Round(x) with an example. -Database management system

Presidency University, Bangalore- Database management systemBy:Aparna-Dasgupta

Taged users:

Likes:

Be first to like this question

Dislikes:

Be first to dislike this question

Talk about thisDelete|Like|Dislike|

## Answers

## ROUND(X,D)

This function returns X rounded to the nearest integer. If a second argument, D, is supplied, then the function returns X rounded to D decimal places. D must be positive or all digits to the right of the decimal point will be removed. Consider the following example −

SQL>SELECT ROUND(5.693893);+---------------------------------------------------------+

| ROUND(5.693893) |

+---------------------------------------------------------+

| 6 |

## TRUNCATE(X,D)

This function is used to return the value of X truncated to D number of decimal places. If D is 0, then the decimal point is removed. If D is negative, then D number of values in the integer part of the value is truncated. Consider the following example −

SQL>SELECT TRUNCATE(7.536432,2);+---------------------------------------------------------+

| TRUNCATE(7.536432,2) |

+---------------------------------------------------------+

| 7.53 |

Fututron

Likes:

Be first to like this answer

Dislikes:

Be first to dislike this answer

Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|

------------------------------------

## Can you help us to add better answer here? Please see this