On Wednesday, April 25, 2001, at 06:09 PM, Neil Lunn wrote:

>> -----Original Message-----
>> From: Thomas von Elling Skifter Eibner [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, April 25, 2001 7:27 AM
>> To: Mark Riehl
>>>
>>> The New Riders MySQL book has the following statements:
>>> SELECT COUNT(*) FROM table_name
>>> SELECT * FROM table_name WHERE 1=0
>>>

>> SELECT 1 FROM table_name (just another variant of yours).

> select * from table_name

These last two certainly work, but they can be pretty wasteful 
of resources. The two mentioned in the New Riders MySQL book 
both return a single row indicating success or failure. The last 
two return a row for each record in the table. You'd probably be 
less than thrilled if you have a few million records.

Mike Schienle
Interactive Visuals, Inc.
http://www.ivsoftware.com

Reply via email to