Javatpoint Logo
Javatpoint Logo

MySQL TRUNCATE Function

The truncate() is a Math function of MySQL. This function is used to get the given number truncated up to given certain decimal places.

Syntax

Parameter:

Number: It is the number to truncate.

decimal_places: It is the number of decimal places truncate to.

Returns

This function returns the number truncated to a certain number of decimal places.

Example 1

Output:

MySQL Math TRUNCATE() Function

Example 2

Output:

MySQL Math TRUNCATE() Function

Example 3

Output:

MySQL Math TRUNCATE() Function

Example 4

Output:

MySQL Math TRUNCATE() Function
Next TopicMySQL Math




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA