Professional Documents
Culture Documents
Final 2022A 11082022 112428pm
Final 2022A 11082022 112428pm
Q1: Create three tables to implement trigger: Teacher, User, Audit_Dept. 15 marks
Teacher Tables:
Id int Primary Key,
Name nvarchar(30),
Salary int,
Gender nvarchar(10),
UserID int
User Table:
UserId
Username
Audit Table:
Audit Id:
Audit Data:
a) Insert three rows in each table
b) Create a trigger on insert for table tblTeachers and insert Audit entries like (“User ID=
___ and Name = ____ has inserted data”)
VIVA: How to create an update Trigger?
Q4: Create a simple stored procedure on tblTeacher to get teacher data with parameter name and
gender. Execute the procedure by providing values for name and gender on runtime. 7.5 marks