Write a trigger to insert some information into employee_audit table (which have four fields: employee_id, salary_after, edit_

computer science

Description

(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


Related Questions in computer science category