If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Auto numbering column

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-22-09, 01:44
Goren Amir Goren Amir is offline
Registered User
 
Join Date: Jul 2009
Posts: 4
Auto numbering column

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



Tnx.
Reply With Quote
  #2 (permalink)  
Old 07-22-09, 03:49
bigcalm bigcalm is offline
Registered User
 
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);
Reply With Quote
  #3 (permalink)  
Old 10-08-09, 22:21
papajack papajack is offline
Registered User
 
Join Date: Oct 2009
Posts: 15
you can select rowid from tablename, rowid is unique.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On