Monday 30 May 2011

Difference Between SELECT * vs SELECT COUNT(*)

* Difference Between SELECT * vs SELECT COUNT(*) ???


Select * - resulting Error
Select * - resulting Error
Select count * - NOT resulting Error
Select count * - NOT resulting Error



Select *” will return all columns from a table (or a result set), if no table specified, error happens.

Select count(*)” will return the number of a table (or result set), if no table specified, it will scan an internal table of constants which has 1 row

No comments:

Post a Comment