📅  最后修改于: 2022-03-11 15:05:07.534000             🧑  作者: Mango
# 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;