Quiz


1:

Which of the following queries selects all data stored in the client table?

  1.  
     select * from client where clientID=2; 
  2.  
     select clientID, name, address, contactPerson, contactNumber from client; 
  3.  
     select * from client limit 1; 
  4.  
     select all from client; 
2:

Which of the following queries selects all the programmers from the employee table?

  1.  
     select * from employee where job='Programmer'; 
  2.  
     select * from employee having job='Programmer'; 
  3.  
     select * from employee where job='Programmer' group by job having job='Programmer'; 
  4.  
     select job from employee; 
3:

Which of the following queries will not return the total number of employees in the employee table?

  1.  
     select count(employeeID) from employee; 
  2.  
     select count(employeeID) as total from employee; 
  3.  
     select count(distinct employeeID) from employee; 
  4.  
     select count(employeeID) from employee group by employeeID; 
4:

Where can we not use aliases?

  1. For columns

  2. For tables

  3. In the WHERE clause

  4. In the SELECT clause

5:

If we want to return the 15th through 20th rows from a query, the correct LIMIT clause is

  1. LIMIT 15, 20

  2. LIMIT 14, 19

  3. LIMIT 14, 5

  4. LIMIT 15, 5




MySQL Tutorial
MySQL Tutorial
ISBN: 0672325845
EAN: 2147483647
Year: 2003
Pages: 261

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