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 > DB2 > Serial Column in DB2! URGENT URGENT

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-08-04, 11:58
shamshad shamshad is offline
Registered User
 
Join Date: Jun 2004
Posts: 2
Exclamation URGENT: WHAT IS MAX VALUE for Serial Type Column

I want to define a ID Column of SERIAL TYPE that will be my Primary Key. What is the maximum value that the Column with SERIAL TYPE will hold.
---------------------------------------------------------------------
I should have been more specific in my question. Here is it:

If I create a database TABLE like this... what is maximum value BBX_KEY will hold? I need to know that.

create table SPX.BBX (
BBX_KEY NO not null,
CHAS_KEY SI not null,
CAL_DATE SI not null,
);

NOTE: The above code has been generated in Powerdesigner.

Shaan

Last edited by shamshad; 06-09-04 at 14:03.
Reply With Quote
  #2 (permalink)  
Old 06-08-04, 14:48
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
There is no datatype 'SERIAL'

The auto-increment Identity Column can be int, smallint, bigint or decimal.
1 Largest INTEGER value +2 147 483 647
2 Largest BIGINT value +9 223 372 036 854 775 807
3 Largest SMALLINT value +32 767

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 06-09-04, 13:24
shamshad shamshad is offline
Registered User
 
Join Date: Jun 2004
Posts: 2
If I create a database TABLE like this... what is maximum value BBX_KEY will hold? I need to know that.

create table SPX.BBX (
BBX_KEY NO not null,
CHAS_KEY SI not null,
CAL_DATE SI not null,
);

Last edited by shamshad; 06-09-04 at 13:54. Reason: Question clarification
Reply With Quote
  #4 (permalink)  
Old 06-09-04, 15:28
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
You are in the DB2 forum ..

What db2 version are you on ?

This CREATE TABLE Statement will not work on LUW and zOS ...

NO, SI are not valid datatypes

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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