PostgreSQL provides a built-in DIV() function that takes two numeric values as arguments, performs division on them, and retrieves the resultant integer.
24x7x365 since 1997
Command Prompt, Inc., is the oldest Postgres Company in North America and one of the oldest Open Source firms still operating today. We serve our clients with best in class expertise and professionalism. You can read more about support and services here:
You have landed at the largest single source of Postgres education blogs in the world. At Command Prompt, we believe deeply that the education of the community is critical to the continued success of Postgres and related technologies. We hope you find content you are looking for and don't hesitate to Contact us today for all your Postgres and Open Source consulting and support needs.
PostgreSQL provides a built-in DIV() function that takes two numeric values as arguments, performs division on them, and retrieves the resultant integer.
In Postgres, double hyphen “--” sign is used for single-line comments, while to use multi-line comments, you need to enclose the comments within “/*” and “*/”.
To create an array in Postgres, users must specify the column name, then the data type, followed by the square brackets “[]”.
Postgres' UPPER() function accepts a string as an argument and converts the string’s case to upper. It can accept any character string, such as CHAR, TEXT, and VARCHAR.
PostgreSQL provides a built-in string function named LOWER() that accepts a string as an argument and converts it into lowercase.
In PostgreSQL, the FLOOR() function is one of the math functions that accept a numeric value or expression and round down the given number to the nearest integer/whole number.
TRIM() is an inbuilt function in Postgres that accepts a string and deletes the leading, trailing, or both leading and trailing spaces or characters from a string.
PostgreSQL provides a built-in function named MD5 that accepts a string as an argument and converts it into a 32 characters text string. It retrieves the resultant value in the hexadecimal.
PostgreSQL provides a built-in mathematical function named LOG() that calculates the logarithm of a number to the base ten or the specified base.
Postgres provides a CEIL() function that takes a numeric value or an expression as an argument and rounds up the given value/expression to the next whole number.