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

Explain what is public role in sql server?

1058


Can we deploy SSRS reports on our personal website?

162


Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?

933


How to drop an existing table with "drop table" statements in ms sql server?

1034


What are parameterized reports? What are cascading parameters in ssrs reports?

148


How to concatenate two strings in SQL Server.

1080


What is shrink log file?

843


Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you

1706


What are the pre-defined functions in the sql server?

1027


Explain the truncate command? : SQL Server Architecture

1092


why would you use sql agent? : Sql server database administration

1116


How many replicas are maintained for each SQL Azure database?

140


What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas

964


What are the different subsets of sql?

1471


Is it possible to call a stored procedure within a stored procedure?

914