QA

Team-Fly    

 
Sams Teach Yourself SQL in 24 Hours, Third Edition
By Ronald R. Plew, Ryan K. Stephens
Table of Contents
Hour 10.  Sorting and Grouping Data


Q&A

Q1:

Is using the GROUP BY clause mandatory when using the ORDER BY clause in a SELECT statement?

A1:

No. Using the GROUP BY clause is strictly optional, but it can be very useful when used with ORDER BY.

Q2:

What is a group value?

A2:

Take the CITY column from the EMPLOYEE_TBL. If you select the employee's name and city, and then group the output by city, all the cities that are identical are arranged together.

Q3:

Must a column appear in the SELECT statement to GROUP BY it?

A3:

Yes, a column must be in the SELECT statement to GROUP BY it.


Team-Fly    
Top
 


Sams Teach Yourself SQL in 24 Hours
Sams Teach Yourself SQL in 24 Hours (5th Edition) (Sams Teach Yourself -- Hours)
ISBN: 0672335417
EAN: 2147483647
Year: 2002
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net