Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between the following two sql
statements
select count(*) from <tablename>
select count(col_name) from <tablename>

Answer Posted / debasis

select count(*) from <tablename> returns the number of rows
in the table.

select count(col_name) from <tablename> return number
values in the column (Ignores null value in the colum). For
example if we execute the following 2 queries then

select count(*) form emp
select count(comm) form emp

The result will be
14
4

Is This Answer Correct ?    34 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to loop through result set objects using odbc_fetch_row()?

962


What is a join in sql? What are the types of joins?

1082


Please explain that what are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture

959


Is mysql the same as sql server?

966


What is openxml in sql server?

1157


Do you know sql server 2008 introduces automatic auditing?

972


wat wil hapn if we give the both read and deny read permission to user?

2097


How to provide values to user defined function parameters?

1001


How is a full-text index updated?

944


What are the advantages of paper records?

956


Explain an incremental backup?

988


Explain about remote stored procedure?

997


can we have a nested transaction? : Sql server database administration

1069


can a table be moved to different filegroup? : Sql server administration

955


Explain the difference between cross join and full outer join?

972