Oracle Database Programming: changing data and managing things in PL/SQL

Source: Internet
Author: User

Oracle Database Programming: Change Data and management items in PL/SQL change data and manage items in PL/SQL: returning clause of DML statements: to obtain the information after the insert, update, and delete statements are executed, you can add the returning clause after the statements instead of the information before execution. If DML changes multiple rows of data, you can use return... Bulk collect into val_collection gets information about changing multiple rows. Forall statement Syntax: forall index (integer variable as subscript) in lower_bound (Upper Bound ).. upper_bound (Lower Bound) SQL statement; the topic of the forall statement must be a single insert, update, or delete statement. Database transactions: commit and rollback ). As long as the data is involved in adding, deleting, and modifying data, things will either be submitted or all fail. After executing commit, all row and table locks in the session are released. Rollback cannot be used for restoration once executed. Automatic transaction submission: Execute DDL (create table, alter table, drop table), DCL (grant, revoke), and exit SQL * plus. Database locks: Row-level exclusive locks (RX locks) are automatically generated when the insert, update, and delete statements are executed. Shared locks are automatically generated when the create statement is executed ); exclusive locks (X locks) are automatically generated when the alteryu statement is executed );

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.