Create UNIQUE KEY

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradheepayyanar
    New Member
    • Jun 2006
    • 12

    Create UNIQUE KEY

    hello
    can anyone tell me how to create a table with 3 columns as UNIQUE KEY

    PraDz
  • somaskarthic
    New Member
    • Aug 2006
    • 60

    #2
    hi

    Try this

    CREATE TABLE test1
    (
    id int4 NOT NULL,
    field1 int4,
    field2 int4,
    field3 int4,
    CONSTRAINT idpkey PRIMARY KEY (id),
    CONSTRAINT field1unique1 UNIQUE (field1),
    CONSTRAINT fieldunique2 UNIQUE (field2),
    CONSTRAINT fieldunique3 UNIQUE (field3)
    )


    -somaskarthic



    Originally posted by pradheepayyanar
    hello
    can anyone tell me how to create a table with 3 columns as UNIQUE KEY

    PraDz

    Comment

    Working...