How Oracle triggers and tasks are created

Source: Internet
Author: User

1. Create a Trigger

Create or Replace Trigger trigger_name_xxx
After delete or update or insert
On table_name_yyy for each row
[Declare var_name_zzz TYPE_NAME_TTT;]
Begin
If Delete Then
.....;
End If;
If Update then
.....;
End If;
If Insert Then
.....;
End If;
End

2. Creating a Process

Create or replace procedure Procedure_name_xxx
As
[Var_name_zzz TYPE_NAME_TTT;]
Begin
......;
End

3. Create a task schedule

DECLARE job_name_xxxx number;
Begin
Dbms_job.submit (job_name_xxxx,' proc_name_yyyy;', TRUNC (sysdate+1) +2/24, ' TRUNC (sysdate+1) +2/24 ‘);
End

How Oracle triggers and tasks are created

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.