Results 1 to 2 of 2

Thread: ROWID in DDL

  1. #1
    Join Date
    Aug 2003
    Location
    France
    Posts
    7

    Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

Posting Permissions

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