PostgreSQL – DISTINCT Keyword The PostgreSQL DISTINCT keyword is used in conjunction with SELECT statement to eliminate all the duplicate records and fetching only unique records. There may be a situation when you have multiple duplicate records in a table. While fetching such records, it makes more sense to fetch only unique records instead of […]
Category Archives: postgresql
PostgreSQL – HAVING Clause The HAVING clause allows us to pick out particular rows where the function”s result meets some condition. The WHERE clause places conditions on the selected columns, whereas the HAVING clause places conditions on groups created by the GROUP BY clause. Syntax The following is the position of the HAVING clause in […]
PostgreSQL – Syntax This chapter provides a list of the PostgreSQL SQL commands, followed by the precise syntax rules for each of these commands. This set of commands is taken from the psql command-line tool. Now that you have Postgres installed, open the psql as − Program Files → PostgreSQL 9.2 → SQL Shell(psql). Using […]