Use the below command to connect to the PostgreSQL database from command line using psql utility. The -W option will
Continue readingCategory: Postgresql
PostgreSQL – Empty a Table (Delete, Truncate)
To empty a table by removing all the rows, you can either use Delete or Truncate. DROP table drops the
Continue readingPostgreSQL – Remove all special characters from a string
You can use regex_replace function to remove all special characters from a string in PostgreSQL database. Syntax is as shown
Continue readingAurora PostgreSQL – Check version
You can check the version of your Postgresql database using the below query: Below select query gives the patch number
Continue readingPostgreSQL – LIKE Operator
LIKE operator is used in the WHERE clause to filter results by pattern matching. LIKE operator uses 2 wildcard options.
Continue readingPostgreSQL – IS NOT NULL
IS NOT NULL condition is used in the WHERE clause to identify records that have a value for the specified
Continue readingPostgreSQL – HAVING Clause
‘HAVING’ clause is used to filter results based on aggregate functions. It is used to filter the results that appear
Continue readingPostgreSQL – GROUP BY
GROUP BY clause is used in a SELECT statement to group “like” records. You can specify one or more columns
Continue readingPostgreSQL – IS NULL
IS NULL condition is used in the WHERE clause to identify records that do not have a value. Syntax: SELECT
Continue readingPostgreSQL – IN Operator
An ‘IN’ clause is used to specify 1 or more values in the WHERE clause. Syntax: SELECT * FROM table_name
Continue reading