TAILIEUCHUNG - HandBooks Professional Java-C-Scrip-SQL part 174

Tham khảo tài liệu 'handbooks professional java-c-scrip-sql part 174', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Triggers Triggers are programs that execute in response to changes in table data or certain database events. There is a predefined set of events that can be hooked with a trigger enabling you to integrate your own processing with that of the database. A triggering event fires or executes the trigger. There are three types of triggering events DML events fire when an INSERT UPDATE or DELETE statement executes. DDL events fire when a CREATE ALTER or DROP statement executes. Database events fire when one of the predefined database-level events occurs. Complete lists of these events are included in later sections. Creating Triggers The syntax for creating a trigger on a DML event is CREATE OR REPLACE TRIGGER triggername BEFORE AFTER INSTEAD OF trigger event ON tableorviewreference NESTED TABLE nestedtablecolumn OF view REFERENCING OLD AS old NEW AS new PARENT AS parent FOR EACH ROW WHEN triggercondition triggerbody The syntax for creating a trigger on a DDL or database event is CREATE OR REPLACE TRIGGER triggername BEFORE AFTER triggerevent ON DATABASE schema WHEN trigger_condition trigger_body Trigger events are listed in the following table Trigger event Description INSERT Fires whenever a row is added to the table_or_view_reference. UPDATE Fires whenever an UPDATE changes the table_or_view_reference. UPDATE triggers can additionally specify an OF clause to restrict firing to updates OF certain columns. DELETE Fires whenever a row is deleted from the table_or_view_reference. Does not fire on a TRUNCATE of the table. ALTER Fires whenever an ALTER statement changes a database object. In this context objects are things like tables or packages found in ALL_OBJECTS . Can apply to a single schema or the entire database. DROP Fires whenever a DROP statement removes an object from the database. In this context objects are things like tables or packages found in ALL_OBJECTS . Can apply to a single schema or the entire database. SERVERERROR Fires whenever a server

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.