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

What are the disadvantages of using the stored procedures?

1102


What do you mean by collation recursive stored procedure?

1056


How do we synchronize On-Premise SQL server with SQL Azure?

122


How to get the definition of a user defined function back?

1044


What are the differences between stored procedure and the dynamic sql?

1091


Distinguish between nested subquery and correlated subquery?

1043


How can you start sql server in different modes?

969


What is importing utility?

984


How to drop an existing stored procedure in ms sql server?

1032


What is normalization? Describe its different types.

1103


How can I check if a view exists in a sql server database?

1038


What is subquery? Explain the properties of a subquery?

988


How to create a large table with random data for index testing in ms sql server?

1031


Which tools are available to manage SQL Azure databases and servers?

115


Why use “nolock” in sql server?

1058