Sams Teach Yourself SQL in 24 Hours (5th Edition) (Sams Teach Yourself -- Hours)

Team-Fly    

 
Sams Teach Yourself SQL in 24 Hours, Third Edition

By Ronald R. Plew, Ryan K. Stephens

Table of Contents
Hour 7.  Introduction to the Database Query

Q&A

Q1:

Why won't the SELECT clause work without the FROM clause?

A1:

The SELECT clause merely tells the database what data you want to see. The FROM clause tells the database where to get the data.

Q2:

When I use the ORDER BY clause and choose the option descending, what does that really do to the data?

A2:

Say that you use the ORDER BY clause and have selected the last_name from the EMPLOYEE_TBL. If you used the descending option, the order would start with the letter Z and finish with the letter A. Now, let's say that you have used the ORDER BY clause and have selected the salary from the EMPLOYEE_PAY_TBL. If you used the descending option, the order would start with the largest salary down to the lowest salary.

Q3:

What advantage is there to renaming columns ?

A3:

The new column name could fit the description of the returned data more closely for a particular report.


Team-Fly    
Top
 

Категории