Postgresql issue
Working with MySQL about two years already, I believed that if you what to count all fields in some table, you should do something like this
But yesteday I found out that it does not work for Postgresql. It often backs you error, something about group by. So solution is to do it in this way
SELECT count(*) FROM table_name
But yesteday I found out that it does not work for Postgresql. It often backs you error, something about group by. So solution is to do it in this way
SELECT DISTINCT count(*) FROM table_name

0 Comments:
Post a Comment
<< Home