In Oracle, how does one implement the function of auto-adding IDs? _ PHP Tutorial

Source: Internet
Author: User
In Oracle, how does one implement a function similar to automatically adding an ID ?. We often use an ID automatically assigned by the system as our primary key when designing a database, but this feature is not available in ORACLE, we can use the following features to implement that we often use an ID automatically assigned by the system as our primary key when designing a database. However, this feature is not available in ORACLE.
You can use the following functions to automatically add ids.
1. first create sequence
Create sequence seqmax increment by 1
2. usage
Select seqmax. nextval ID from dual
You get an ID.
If you put this statement in the trigger, you can achieve and the MS SQL automatically add the same ID function!


Pipeline does not have such a function. we can implement it by taking the following functions...

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.