// TO DISPLAY RECORDS USING "DISPLAY" BUTTON // Begin select staff_no, branch_no, staff_surname, staff_forenames, staff_street, staff_area, staff_town, staff_pcode, staff_telno, staff_gender, staff_salary into :staff.staff_no, :staff.branch_no, :staff.staff_surname, :staff.staff_forenames, :staff.staff_street, :staff.staff_area, :staff.staff_town, :staff.staff_pcode, :staff.staff_telno, :staff.staff_gender, :staff.staff_salary from staff where staff.staff_no = :staff.staff_no; exception when no_data_found then message ('Record not found'); end; ============================================== // TO EXIT FORM USING "EXIT" BUTTON // Begin exit_form; End; ============================================== // TO CALCULATE AVERAGAE USING "AVERAGE" BUTTON // Begin select avg (staff_salary) into:staff.salary_avg from staff; End; =============================================== // TO CREATE TRIGGER (KEY_NEXT_ITEM) for field STAFF_NO // declare alert_button number; Begin select * into:staff.staff_no, :staff.branch_no, :staff.staff_surname, :staff.staff_forenames, :staff.staff_street, :staff.staff_area, :staff.staff_town, :staff.staff_pcode, :staff.staff_telno, :staff.staff_gender, :staff.staff_salary from staff where staff.staff_no=staff.staff_no; go_block('inspection'); execute_query; exception when no_data_found then alert_button:=show_alert('notfound'); go_item('staff.staff_no'); End; =============================================== // TO CREATE AN ALERT, which is displayed when a user pressess EXIT Button \\ declare alert_button number; Begin alert_button:=show_alert('exit_message'); if alert_button=alert_button1 then commit; exit_form; end if; end; ================================================