{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Alter trigger empdeptins disable nvl function in

Info iconThis preview shows pages 2–3. Sign up to view the full content.

View Full Document Right Arrow Icon
ALTER TRIGGER emp_dept_ins DISABLE; NVL function: in Oracle/PLSQL, the NVL function lets you substitute a value when a null value is encountered. The syntax for the NVL function is:
Background image of page 2

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
NVL( string1, replace_with ) string1 is the string to test for a null value. replace_with is the value returned if string1 is null. Assignment: Q1: You have the following tables: Hotel (Hotel_id , h_name, contact person) Room (room_no , floor_no, occupied) Reserve (h_id, r_no , guestname, date) Create a trigger that update the occupied field in the room to ‘y’ if the room is reserved to a guest. Q2: You have the following tables: Car (car_no , model, hour_price, no_of_drivers) Driver (d_no , d_name) Workdetails (trans_no , dno , carno ) Create a trigger that increases the no of drivers by one when a driver drives this car. Q3: You have the following tables: product (p_id,p_name,unitinstock) order_details (o_id,p_id,quantity) Create a trigger that decreases the units in stock with the quantity every time an order is made
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page2 / 3

ALTER TRIGGER empdeptins DISABLE NVL function in...

This preview shows document pages 2 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online