(1)
Write a trigger to
insert some information into employee_audit table (which have four fields:
employee_id, salary_after, edit_time, and action) every time, when an INSERT happens
into employee table.
(2) Write
a trigger to insert some information into log_employee table (which have five
fields employee_id, salary_before, salary_after, edit_time, and action) every
time, after an UPDATE happen into employee table.
(3). Create an index
“IndLastFirstName” with columns LAST_NAME and FIRST_ NAME on employee table.
(4).
List the query which will use the index “IndLastFirstName”
a) Select * from employee where FIRST_ NAME=’Joe’
b) Select * from employee where LAST_NAME =’LEE’
c) Select * from employee where LAST_NAME =’LEE’ and FIRST_ NAME=’Joe’
d) Select * from employee where LAST_NAME
=’LEE’ or FIRST_ NAME=’Joe’
1. (a) Create a Store Procedure to list CustomerName,
ContactName and phone for a given City as input parameter. (10 points)
The structure of the table: Customers
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Get Free Quote!
317 Experts Online