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 many triggers you can have on a table?

1032


What are the three different part of rdl file explain them?

274


What is 'write-ahead log' in sql server 2000 ?

1105


What is the data type of time?

1014


What are window functions in sql server?

1065


What is the purpose of optimization?

1055


Do you know what is a linked server in sql server?

1067


What is named query? : sql server analysis services, ssas

998


what happens on checkpoint? : Sql server database administration

1156


Can a table have 2 primary keys?

1030


what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

1110


What are unicode character string data types in ms sql server?

1338


Tell me what is the stuff and how does it differ from the replace function?

1032


What are the 7 disadvantages to a manual system?

1029


Can anyone tell that the extra features are there in SQL SERVER 2008 that are not available in previous versions .

1990