Home : General : Databases and SQL :

General: Databases and SQL: number of records in table: Edit Log

Here is the list of edits for this post
number of records in table
Ok, this may seem like another dumb question from Sooke, but there seems to be many ways of doing this. (select, count or otherwise)

What is the most efficient way to set a value equal to the number of rows (including nulls) in a table?

Example my $total_categories = $DB->table('Category') blah

and one more thing.... how easy is it to add the "DISTINCT" value to such a count if need be?

Many thanks.

Last edited by:

sooke: May 15, 2002, 4:38 PM

Edit Log: