ORACLE trigger instance

Source: Internet
Author: User

Instance 1

 
Create or replace trigger update_portauser_pass after update on cas_porta_user for each rowdeclare -- local variables herebegin update security_credential C set C. column_value =: New. column_value where c. principal_id in (select P. principal_id from security_principal P where p. full_path =: New. full_path); end;

 

 

Instance 2

 
Create or replace trigger inser_casuser after insert on cas_user for each rowdeclare -- local variables herebegin if: New. type = 1 then insert into cas_user_group (userid, GID) values (: New. userid, '578d3415633b47bd9c1fe8bf905cbfb1 '); else insert into cas_user_group (userid, GID) values (: New. userid, '387bcd57fc5a4c3c9de83ee210fef661 '); end if; end inser_casuser;

 

 

Define types directly,
Type td02_table_type is table of td02 % rowtype index by binary_integer;

Td02_table td02_table_type;
Select B. * Bulk collect
Into td02_table -- Eastern District
From td02 B where B. ytd024 = v_root_id;

 

 

 

 

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.