Exercises


1:

Write a query that returns employee names and jobs, but, if an employee's job is 'Programmer' , rewrites this as 'Analyst / Programmer' .

2:

Write a query to insert a new department called Property Services. Then, write a query to insert a new employee called Fred Smith, job DBA, who works for that department. Use last_insert_id() to insert the department number.

3:

Write a query that selects the most recent assignment from the assignment table. (Hint: use the max() grouping function.)




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