tags:

views:

35

answers:

1

I have this table

CREATE TABLE "VACCINE" 
(
  "CVX"  INTEGER,
  "CPT"  CHAR(5),
  "SHORTNAME"  VARCHAR(20),
  "FULLNAME"  VARCHAR(256),
  "VTYPE"  CHAR(1),
 UNIQUE ("CVX")
);

but it turns out that CVX is not unique after all. How do I drop the unique constraint?

I can get the name of the constraint like this

select rdb$constraint_name from rdb$relation_constraints where rdb$relation_name = 'VACCINE'

but I get a syntax error after I do this

alter table vaccine drop constraint 'INTEG_400'

where INTEG_400 is the result of the select.

+1  A: 

I think this will work :

alter table vaccine drop constraint INTEG_400

Try with IBExpert : it will show you the code

Hugues Van Landeghem
Thanks ... trying without the quotes wasn't one of the things I tried!
Graham Chiu