Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010
    Posts
    4

    Unanswered: how create table with data type Enum and autoincrement

    hi.

    im dummie in db 2, i like create a table with data type Enum an data with property auto increment. my query in Mysql is this:

    CREATE TABLE bines (
    id int(6) NOT NULL auto_increment,
    tipo_tarjeta enum('CREDITO','DEBITO','AMEX') NOT NULL,
    inicio int(6) NOT NULL,
    fin int(6) NOT NULL,
    tarjeta_id int(6) NOT NULL,
    PRIMARY KEY (`id`) ) ;

    how is the query in db2?
    please help me.

  2. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    I am not too familiar with the ENUM data type, but isn't this the same as defining the data as CHAR and adding a check constraint?
    Dave

Posting Permissions

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