Experts in Postgres and Open Source Infrastructure

24x7, 365 Enterprise services since 1997

Education

This is the Education section of the Command Prompt Website. Here you will find blogs specifically about how to use Postgres and related technologies.

How to Use POWER() Function in PostgreSQL

The POWER() or POW() function accepts two numeric values as arguments and retrieves the first value raised to the power of the second value.

How to Sort Table Data BY Date in PostgreSQL

To sort the table’s data into a specific format, the ORDER BY clause is used in Postgres. Postgres users must use the ORDER BY clause on the DATE type column to sort the table data by date.

Alias in PostgreSQL With Examples

ALIASES are used in Postgres to provide a temporary name to the columns, tables, etc., while executing/writing Postgres queries.

How to Fix Column Does not Exist Exception/Error in PostgreSQL

In Postgres, the “column doesn’t exist” error occurs because of various reasons, such as the searched column doesn’t exist, typo mistakes, column alias being used incorrectly, etc.

How to Define an Auto Increment Primary Key in PostgreSQL

To define an auto-incremented primary key in Postgres, specify a column name followed by a pseudo data type named “SERIAL”, and then specify the PRIMARY KEY keyword.

ARRAY_TO_STRING() Function in PostgreSQL

PostgreSQL offers an ARRAY_TO_STRING() function that accepts three arguments: an array, a delimiter, and a text to replace the null values.

PostgreSQL Pattern Matching: LIKE VS Not LIKE VS ILIKE

The LIKE operator matches the search expression with the specified pattern and retrieves true if the match is found. The NOT LIKE operator negates the results of the LIKE operator,.

PostgreSQL TRUNC() VS ROUND() Function

The TRUNC() function trims the whole fractional part or up to specified precision, while the ROUND() function rounds the input number to the nearest integer/specified fractional places.

String Arrays in PostgreSQL

PostgreSQL allows us to create a string array using one of three data types: CHAR, VARCHAR, and TEXT. Once an array is created, various operations can be performed on that array.

ARRAY_REMOVE() Function in PostgreSQL

ARRAY_REMOVE() function accepts an array and a specific number as arguments and deletes all the occurrences of that particular number from the input array.