Subject | Re: how to drop a unique constraint? |
---|---|
Author | gchiu2 |
Post date | 2010-10-04T21:56:13Z |
It seems I don't need the quotes and it works.
--- In firebird-support@yahoogroups.com, "gchiu2" <yahoo@...> wrote:
>
> 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.
>