Answers for "constraint Alter in column"

SQL
0

alter constraint in sql

You can not alter constraints ever but you can drop them and then recreate.

Have look on this

    ALTER TABLE your_table DROP CONSTRAINT ACTIVEPROG_FKEY1;

and then recreate it with ON DELETE CASCADE like this

    ALTER TABLE your_table
    add CONSTRAINT ACTIVEPROG_FKEY1 FOREIGN KEY(ActiveProgCode) REFERENCES PROGRAM(ActiveProgCode)
        ON DELETE CASCADE;
hope this help
Posted by: Guest on May-20-2021
0

sql change column in existing table

'This adds 'NOT NULL' to excisting column counting in the table mytable'
ALTER TABLE mytable ALTER COLUMN counting INT NOT NULL;
Posted by: Guest on December-09-2020

Code answers related to "constraint Alter in column"

Code answers related to "SQL"

Browse Popular Code Answers by Language