Results 1 to 2 of 2

Thread: serial value

  1. #1
    Join Date
    May 2008
    Posts
    24

    Unanswered: serial value

    Hi,
    I've a table with first column declared as serial type. In my INSERT statement, im using 0 to insert value to this field.

    The problem is when i delete the records from this table and when i do insert from the scratch, this serial value is not getting reintitated to 1 whereas it is continuing from the last insert statement value.

    Please can anyone let me know how to set this to start from 1.

    Thanks.

  2. #2
    Join Date
    Sep 2004
    Posts
    51

    serial value

    You need to run an alter table:

    The following example sets the next serial value to 1000:

    ALTER TABLE my_table MODIFY (serial_num serial (1000))

    I hope this helps.

Posting Permissions

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