Gossamer Forum
Home : General : Databases and SQL :

number of records in table

Quote Reply
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
Subject Author Views Date
Thread number of records in table Ian 5130 May 15, 2002, 4:34 PM
Thread Re: [sooke] number of records in table
Paul 4950 May 15, 2002, 4:49 PM
Post Re: [Paul] number of records in table
Ian 4887 May 15, 2002, 4:58 PM