Re: drop a check

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: ivan marchesini <marchesini(at)unipg(dot)it>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: drop a check
Date: 2006-11-13 17:41:39
Message-ID: 20061113174138.GB1403@alamut
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Nov 13 05:32, ivan marchesini wrote:
> I have created a check constraint without giving it a name..
> now I have a check named "$25" in my table that I need to drop or
> modify!!!
> How can I do???
> with names is simple
>
> alter table tablename drop constraint constraintname;
>
> but without name?? :-)

CREATE TABLE cons_test (
u integer CHECK (u > 10)
);

SELECT constraint_name
FROM information_schema.constraint_column_usage
WHERE table_name = 'cons_test' AND
column_name = 'u';

See infoschema-constraint-column-usage.html in the manual for further
assistance.

Regards.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2006-11-13 17:42:29 Re: RES: Inserting data in composite types!
Previous Message ivan marchesini 2006-11-13 17:38:27 Re: drop a check