This tutorial explains how to use the MySQL TRUNCATE function with syntax and examples.
The MySQL TRUNCATE function returns a number truncated to a certain number of decimal places.
The syntax for the TRUNCATE function in MySQL is:
The number to truncate.
The number of decimal places truncate to. This value must be a positive or negative integer.
The TRUNCATE function can be used in the following versions of MySQL:
Let's look at some MySQL TRUNCATE function examples and explore how to use the TRUNCATE function in MySQL.
For example: