Adding a Constraint.


i need add constraint various feilds in table.

on executing following code incorrect syntax constraint. please see attached code

all highly regarded

r

alter table [nop].[dbo].[product]  alter column packsperlayer int not null   constraint ck_product_packsperlayer default '0'  go

alter table [nop].[dbo].[product] add constraint [ck_product_packsperlayer] default '0' [packsperlayer]


jon



SQL Server  >  SQL Server Tools



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........