The difference between the standard and sequence of Oracle database

Source: Internet
Author: User

The two are totally different things.
Cursors are based on the query result set
Let's say that one of your SELECT statements queries a result set of several records, and if you want to make a judgment or other action on each row in the result set, then the SQL statement update or the specific action for each row will not be satisfied, and this time the cursor will work:
You can define this result set as a cursor, and you can iterate through each row of records in the result set and manipulate it by using the cursor, which means you can iterate through the operation data by executing a for loop on the results of a select query.
And the sequence is an object in Oracle, just like a table, a view, you can build a table: Create TABLE ...
To build the sequence: Create sequence ...
It's just that its structure and function are different from the table, which is a sequence of automatically added numbers for a rule, typically used as a surrogate primary key, or as an ordinal generator.

Differences between the target and sequence of Oracle databases

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.