Answers for "how to count with except in psql"

SQL
0

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;
Posted by: Guest on November-17-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language