Forum OpenACS Q&A: Query return 0 row
with null value.
Assume there is no user with id = 3 in the table.
Select user_id, count(*) from users where user_id=3 group by use_id;
I face a problem in this type of query where query return 0 row.
Can anyone teach me how to fix it? Thanks for your help
select count(*) from users where user_id=3and Postgres will return one row (the value being either 0 or 1). The row only "disappears" when you add the group by clause.