How to create autoincrement id in oracle with full example



Here i am telling you How to create autoincrement id in oracle with full example
  • First of all you need to open your oracle database and login with your given username and password.
  •  And then click on Object Browser and create a table (name which you want) here i use s2ptech.
  • Here in s2ptech table i use two field id and name.
  • Click on next button and then select not populated option in radio button.
  • Select primary key (id which you want to autoincrement) and click next->next->finish->create.
  • Now your table is created.
  • Now click on Sequence and fill the sequence name(seq_s2ptech).

  • And click on next, click on create and now your sequence is created
  • Now click on Trigger and fill the table name(s2ptech) and click on next.
  • Now do the action as shown in below image.
  • And click on next and finish.
  • At last you'll get trigger detail where if object status is valid and trigger status is enable will be shown then all works are done good.
And Yahooooooooo !!!!!
its time to insert your data in your table with auto-increment id in oracle

0 Comments
Disqus
Fb Comments
Comments :

0 comments:

Post a Comment