altering DEFAULT constraint on column SQL

前端 未结 3 2042
死守一世寂寞
死守一世寂寞 2020-12-11 07:19

I have an SQL script for creating a table, i would like the default of all but a few columns to be \"\" the others require a integer default of 0

The following crea

3条回答
  •  再見小時候
    2020-12-11 07:35

    The syntax is:

    ALTER TABLE [dbo].[PMIPatients] ADD CONSTRAINT NameYourConstraint DEFAULT ((0))  FOR [PatientFallRiskLevel]  
    
    ALTER TABLE [dbo].[PMIPatients] DROP CONSTRAINT NameYourConstraint 
    

提交回复
热议问题