Home  
 
  Ask Questions  
 
  Feed Back  
 
  My Questions  
 
  Contact Us  
 
  About Us  
 
 Interview Questions  
 Our Services  

Get 9,000 Interview Questions & Answers in an eBook.


  • 9500+ Pages
  • 9000 Question & Answers
  • All Tech. Categories
  • 14 MB Content

    Get it now !!



    Send your Resume to 6000 Companies

  • 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.9) By 26 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:


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





     Sponsors  
    Latest 10 Answers
    Using WebServices.... by generating a WSDL file of XML and providing it to client
    now a days, the os mostly used in companies is only and only LINUX, the starting salary in LINUX will be around 20k++.
    ans is 8 only not 10 ..... try with TC.
    Improve your logic, never stop learning,be flexible with multiple technologies.
    Human resource manager comes to recruit and represents the company.
    Audit is the review of the financial statements and giving a fair and true opinion about it.
    Web applications run on internet whereas windows applications run on your personal computer without using internet.
    White. Since C said not sure, A & B standing in front must be wearing both White or one black & one white. Since B said not sure, A standing in front must be wearing White. So A is sure that he is wearing White.
    Yes pointers are integers as it contains the address location . addresses are integers.
    (30*5)+(24*6)=150+144=294 294/2=147

    G o o g l e Search

    Google

    Newinterviewquestions.com is a part of Vyom Network. Top



    Copyright ? 2008, newinterviewquestions.com. All rights reserved Privacy Policy

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


    Download Yahoo Messenger