1

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!

Dave Sexton
  • 10,768
  • 3
  • 42
  • 56
BendEg
  • 20,098
  • 17
  • 57
  • 131

1 Answers1

1

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.

Graeme Perrow
  • 56,086
  • 21
  • 82
  • 121