in reply to How can I pass number of rows value in psql table into HTML?
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
|
|---|