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 > ROWID in DDL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-09-03, 11:21
psn psn is offline
Registered User
 
Join Date: Aug 2003
Location: France
Posts: 7
ROWID in DDL

Hi,

I want to migrate a Database from DB2 OS390 to DB2 8.1 AIX in the OS390 generated DDL is the following statement:
create table xxxx ( idcol rowid not null generated always )
On DB2 8.1 this generate me an error SQL0104N and DB21034E
How can I translate this coloumn definition for DB2 8.1 on AIX ?

Thanks for your help
Reply With Quote
  #2 (permalink)  
Old 11-09-03, 11:58
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
DB2 8.1 for LUW (Unix,etc) does not currently support ROWID (direct storage of the internal DB2 rowid). The closest thing would probably be:

CREATE TABLE XXXX
(IDCOL INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY
(START WITH 1, INCREMENT BY 1),

You can use certain other numeric data types in addition to integer. This column can be populated by the load/import command.

You might want to consult the following guide downloadable from the IBM website: "SQL Reference for Cross-Platform Development Version 1.1"
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
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