Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

PostgreSQL DISTINCT

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 fetching duplicate records.
postgres=# SELECT name FROM tab1;           
 name  
-------
 nijam
 abu
 umar
 jamal
 abu
(5 rows)
-- From above table  tab1 having one duplicate values "name=ABU" is duplicate so DISTINCT  clause used to show without duplicate values. 
postgres=# SELECT DISTINCT(name) FROM tab1; 
 name  
-------
 umar
 jamal
 nijam
 abu
(4 rows)













Comments

Popular posts from this blog

VMWARE WORKSTATION 3,4,5,6,7,8,9,10,11,12,14,15...etc LICENSE KEYS COLLECTION

Top 10 Highest Paying URL Shortener Companies - Best URL Shorteners To Earn Fast

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

aireplay-ng

2017 Shortern URL - Other Website Like ADFOC.US