SELECT count(*) FROM yourtable is much better: it is faster and avoid transferring to your program the contents of the entire table (with huge tables this can make a huge difference)
This statement return only one row, with only one integer value, which is the number of rows in yourtable
In reply to Re: How can I pass number of rows value in psql table into HTML?
by psini
in thread How can I pass number of rows value in psql table into HTML?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |