Sybase SQL Anywhere drop all constraints on a column

624 Views Asked by At

Is it possible in SAP Sybase SQL Anywhere 12.0.1 to drop all constrains with a simple and single line of code for a specific column in a table? I know I can get them via sys-tables, but maybe there is some easier way of doing this.

Thank you very much!

1

There are 1 best solutions below

0
Graeme Perrow On BEST ANSWER

No, you can't drop multiple constraints with a single statement.

You can use ALTER TABLE to drop individual constraints, so ALTER TABLE mytable ALTER mycolumn DROP CONSTRAINT constraint-name, but you must execute the statement separately for each constraint you want to drop.

Disclaimer: I work for SAP in SQL Anywhere engineering.