Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to count with except in psql

# In case you want to count the no. of rows in your psql query which is using except

# let's say this is your original query

SELECT id from table1 except select id from table2;

# to get count do this
select count(*) from (SELECT id from table1 except select id from table2) temp;
 
PREVIOUS NEXT
Tagged: #count #psql
ADD COMMENT
Topic
Name
6+7 =