SEO Software
Closed Thread
Results 1 to 4 of 4

Thread: How to make autoincrement in oracle?

  1. #1

    Default How to make autoincrement in oracle?

    I am finding trouble to find auto incement with the oracle table I am able to do it in mysql how can I implement it in oracle?


  2. #2

    Default

    You can create sequence for the auto increment values in the oracle

    HTML Code:
    create sequence sequencename
    Let me know if you have problem further

  3. #3

    Default

    I am new to oracle database so can you show me an example how to make a sequence?

  4. #4

    Default

    First create table with numeric field in it

    Then create sequence

    HTML Code:
    create sequence myseq start with 1 increment by 1;
    then create trigger

    HTML Code:
    create or replace trigger mytrig
    before insert on table
    for each row
    begin
        select myseq.nextval into :new.id from dual;
    end;

Closed Thread

Similar Threads

  1. Software to make css
    By nikon in forum HTML & CSS Help
    Replies: 46
    Last Post: 05-11-2012, 12:00 AM
  2. Pdf - how to make into an ebook?
    By ha198000 in forum Increase Revenue
    Replies: 21
    Last Post: 01-22-2012, 05:06 PM
  3. Oracle
    By Amar in forum Databases
    Replies: 12
    Last Post: 08-01-2009, 10:38 AM
  4. Connecting php with oracle.
    By nikon in forum PHP Help
    Replies: 5
    Last Post: 06-22-2009, 08:53 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts