Home  
 
  Ask Questions  
 
  Feed Back  
 
  My Questions  
 
  Contact Us  
 
  About Us  
 


 Interview Questions  
 Our Services  
NEW INTERVIEW QUESTIONS.COM ORACLE INTERVIEW QUESTIONS DETAILS


NewInterviewQuestions.com - Home for World's Largest Interview Questions Website.

A D V E R T I S E M E N T




Add to My Questions Add to My Questions | Forward Forward | Print Print


Question Question what is the difference between count(*) and count(1)
Answer Answer

count(*) it will count the number of records for each fields/columns and count(1) it will count the number of records for the first field...

Answered By: SAM    Date: 7/24/2007

there is no differnce thats give same outputs

Answered By: heman    Date: 7/28/2007

Count(*) will count all the no of records in the table irrespective of the fields whether they or null or not when we select. where as count(1) will not consider the null records

Answered By: RR    Date: 8/1/2007

Count(*) will return the no of rows present in the table including the null values bun in case of count() will return non null records i.e it will not displayed the null values present in the record

Answered By: neelamadhab padhy    Date: 8/20/2007

count(*) and count(1) will count the number of records in all the fields and in the first field respectively

Answered By: puneet    Date: 8/26/2007

Count(*) will return the no of rows present in the table including the null values bun in case of count() will return non null records i.e it will not displayed the null values present in the record

Answered By: sudhan    Date: 10/22/2007

No difference both we give the same output

Answered By: vidhya    Date: 11/21/2007

Count(1) is faster to count(*).

Answered By: V.Karthikeyan    Date: 1/1/2008

Count(1) is faster to count(*).

Answered By: V.Karthikeyan    Date: 1/1/2008

both gives the same output .....

Answered By: Abhishek Verma    Date: 1/2/2008

There is difference, Count(*) is slower than count(1) query. using Count(1) improves performance and its substantial in case of tables > 20K rows

Answered By: sagar    Date: 2/5/2008

count(*) will return the all the rows in a table,count(1) is only one row record is appear.

Answered By: venkat    Date: 2/6/2008

Both Will give same results

Answered By: Sharanabasappa    Date: 2/6/2008

In most Cases the first feild will be primary key and we will get same number as output...

Answered By: pax    Date: 2/6/2008

count(*)will be count the no of records in field and count(1)will be count the only one record field

Answered By: surendra    Date: 2/11/2008

count(*) will count all fields in record count(1) counts only first field of the record

Answered By: Jhansi    Date: 2/12/2008

Both will give the same output, the difference is count(1) is faster compared to count(*)

Answered By: Jyothi    Date: 3/4/2008

No difference between count(*) and count(1) but if you write count(empname) (or any field name) it will count all rows which donot have any null value,i.e it does not count null values rows.

Answered By: Rajesh    Date: 3/5/2008

Count(*) will count the number of records and it also count the number of records for particular field....but the count(1) count the number of records only.

Answered By: R.Pradeep    Date: 3/19/2008

Count(*) will give gives count of NULL where as count(1) gives record in that column.

Answered By: MD    Date: 3/31/2008

count(1) is faster to count(*). on difference answer both we give the same output.

Answered By: shailendra singh    Date: 4/1/2008

count(*) returns number of records in a relation including null values. and count() returns number of records in a relation except null values.

Answered By: Tanveer    Date: 5/8/2008

count(1) will consider the nulls and is same as count(*) except it gives the count of the first column. Count(col_name) will not count the nulls. It returns only non-null record count.

Answered By: gsr    Date: 5/12/2008

count(*) will include all values including null values but count(1) give output excluding null values

Answered By: amit     Date: 5/28/2008

Count(*) will return the no of rows present in the table including the null values but in case of count(1) will return non null records .

Answered By: surya mani singh    Date: 6/8/2008

Both will give the same output, the difference is count(1) is faster compared to count(*) .

Answered By: Sampath Kumar    Date: 7/1/2008

Count(*) will return the no of rows present in the table including the null values, but in case of count(1) will return non null records.

Answered By: sampath    Date: 7/1/2008

Count(1) refers rowid directly Count(col name) refers column name and nulls are not considered Count(*) refers all the columns irrespsctive of nulls present. Ultimately count(1) is always faster.

Answered By: Antony Raj    Date: 7/15/2008

The difference is count(1) is faster than count(*).

Answered By: sandeep    Date: 8/7/2008

© NewInterviewQuestions.com


If you have the better answer, than send it to us. We will display your answer after the approval.
Answer Answer:*
Name Name:*
Email Address Email Address:*
     Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
 


Rate the above answer. Help us to know about the answer.
Category Category Oracle Interview Questions
Rating Rating (3.1) By 158 users
Added Added 7/19/2007
Views Views 1
Rate it Rate it!
Free Offers Free Offers: 300 Free Magazines for you. No credit card required. No Shipping Charges. Absolutely Free for 1 Year.

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when answer is posted!
Email:





 Sponsors  

Latest 10 Answers
When there is any situation that u should attach a new patch to ur kernel , then download the patch and install it,to make changes to kernel , go to ok prompt and type boot -r, it will update or reconfigure the kernel
Honesty, helpful and reliable
procedure is a set of sql statement ,are combined to gether to perform a specific task or to solve a specifi problem.it does not return value.
leadership is power to influence a group so that the members willingly exert efforts as aspired by the leader.
I have the unique combination of technical skill and the ability to build strong customer relationship. I have the ability to stay focussed in stressfull situation. I would be great addition to your team.
first execute the bc search spec to fetch the data then executes the applet search spec if applet search spec is not match with bc it skips
TCP-Transmission Control Protocol. TCP is Reliable. TCP is Connection oriented. UDP-User Datagram Protoco UDP is Unreliable. UDP is Connectionless.
By default in structure all data member and member function are public,i,e if you not mentation any access specifier. But in case of class By default all data member and member function are private.
Structure is a user defined data type. By default all structure variables are public type and we cann't use access specifier in structure type variable, where as in class we can define objects(variables) under required access specifier type.
variable cost is the cost which is not fixed in nature

Newinterviewquestions.com is a part of Vyom Network. Top



Copyright © 2017, newinterviewquestions.com. All rights reserved Privacy Policy | Terms and Conditions

Page URL: http://www.newinterviewquestions.com/interview/11447/Default.asp?cachecommand=bypass


Download Yahoo Messenger | Web Hosting | Dedicated Server | Free SMS Domain Registration | Windows Hosting | Linux Hosting | Java Hosting | Virtual Dedicated Server | Dedicated Server | Reseller Web Hosting | Unlimited Windows reseller hosting | Unlimited Linux reseller hosting | Cheap Windows reseller hosting | Cheap Linux reseller hosting | Cheap Windows hosting | Best Windows hosting | Windows hosting Multiple Domains | Unlimited Windows hosting | Compare hosting plans | Cheap Linux hosting | Best Linux hosting | Linux hosting Multiple Domains | Unlimited Linux hosting | Cheap asp.net hosting | Best asp.net hosting | unlimited asp.net hosting | Cheap asp.net reseller hosting | Unlimited asp.net reseller hosting | Java Features | Cheap Java hosting | Best Java hosting | unlimited Java Hosting | Unlimited Linux reseller hosting | Java Hosting Multiple Domains Quick2host Reviews Buy Online Traffic