Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    4

    Unanswered: Auto numbering column

    Hi,
    How can I create a table with a column contains an auto numbering ( Auto ID column ) ?



    Tnx.

  2. #2
    Join Date
    Jul 2009
    Posts
    37
    you want a SERIAL column type.

    eg.

    create table dropme ( pk1 serial, hello char(20) );

    create unique index i_dropme_1 on dropme (pk1);

    alter table dropme add constraint primary key (pk1);

  3. #3
    Join Date
    Oct 2009
    Posts
    15
    you can select rowid from tablename, rowid is unique.

Posting Permissions

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