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

This is the end of the preview.
Sign up
to
access the rest of the document.