1

This is what I tried. I simply want to remove the constraint I just did there

ALTER TABLE product
ADD DEFAULT NULL FOR sale_id

ALTER TABLE product
ALTER COLUMN sale_id DROP DEFAULT
Philip
  • 11
  • 1
  • 1
    Does this answer your question? [Drop default constraint on a column in TSQL](https://stackoverflow.com/questions/10777353/drop-default-constraint-on-a-column-in-tsql) – SMor Nov 13 '21 at 13:07

1 Answers1

1
ALTER TABLE TABLE_NAME
DROP CONSTRAINT <constraint_name>

Eg:

ALTER TABLE students
ALTER COLUMN ph
DROP NOT NULL;
Karthik Bhandary
  • 1,305
  • 2
  • 7
  • 16