GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 168 of 170    Print  
how many columns can be in the group by clause

  
Total Answers and Comments: 5 Last Update: September 01, 2008     Asked by: radha11 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Srinivas4u
 

I am sure that a group by clause can have all columns which are there in that table,not sure if you are looking for anotehr answer



Above answer was rated as good by the following members:
deepu_478
July 16, 2008 10:14:55   #1  
Srinivas4u Member Since: July 2008   Contribution: 1    

RE: how many columns can be in the group by clause

I am sure that a group by clause can have all columns which are there in that table,not sure if you are looking for anotehr answer


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    
July 22, 2008 01:45:14   #2  
krishnaveni_g Member Since: July 2008   Contribution: 10    

RE: how many columns can be in the group by clause
The columns which are used in the SELECT statement with GROUP BY function are compulsory used in the GROUP BY clause. 
 
Is this answer useful? Yes | No
July 28, 2008 08:25:39   #3  
nsr.nandu Member Since: July 2008   Contribution: 1    

RE: how many columns can be in the group by clause
When you mention a column name in GROUP BY Cluase you must mention the same in SELECT statement
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
August 30, 2008 13:58:11   #4  
rajaraddi Member Since: August 2008   Contribution: 1    

RE: how many columns can be in the group by clause
For Aggregation:
No. of cols in group by clause = No. of cols in SELECT clause - No. of cols to be aggregated.

For eliminating the duplicates
No. of cols in group by clause = No. of cols in SELECT clause.

In general there might be n number of cols that can be used in the group by clause, which depends on
your number of cols present in SELECT clause

Thanks,
Raju

 
Is this answer useful? Yes | No
September 01, 2008 05:26:43   #5  
raghuprasad Member Since: August 2007   Contribution: 23    

RE: how many columns can be in the group by clause
There can be as many as all the number of columns of the table which can be used in the GROUP BY clause. Oracle Server handle of this itself.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape