In this PostgreSQL post explains how to use the PostgreSQL div function with syntax and examples.
The PostgreSQL div function is used for integer division where n is divided by m and an integer value is returned.
The syntax for the div function in PostgreSQL is:
A numeric value that will be divided by m.
The number used to divide into n.
The div function can be used in the following versions of PostgreSQL:
Let's look at some PostgreSQL div function examples and explore how to use the div function in PostgreSQL.
For example: