Docsity

TRIGGERS QUESTIONS PRACTICE IN SQL LAB, Lab Reports of Database Management Systems (DBMS)

Partial preview of the text

Download TRIGGERS QUESTIONS PRACTICE IN SQL LAB and more Lab Reports Database Management Systems (DBMS) in PDF only on Docsity!

NUST

Military College of Signals,

Rawalpindi.

DATABASE SYSTEM

LAB # 11

BATCH-26C

Submitted By:

AYMEN FATIMA

CMS ID:

Submitted To:

Sir Kabeer Ahmed

DEPARTMENT OF COMPUTER SOFTWARE ENGINEERING.

MILITARY COLLEGE OF SIGNALS.

Question No 1

Problem 11. [5] Write a TRIGGER to ensure that DEPT TABLE does not contain duplicate of null values in DEPTNO column. Insert Record in Department having Employee No equal to NULL twice: Trigger Gives Error when I want to insert record 2nd time:

Question No 3 Problem 11. [5] Write a Trigger to carry out the following action: on deleting any records from the emp table, the same values must be inserted into the log table. Delete Record from Employee Table: Record is automatically inserted into Log Table: