日期:2014-05-17 浏览次数:20647 次
--查询约束
sp_helpconstraint purchase_order4
--删除约束
ALTER TABLE purchase_order4
drop constraint purchase_order4_pkey
ALTER TABLE purchase_order4 add constraint purchase_order4_pkey PRIMARY KEY(ponum)
CREATE TABLE purchase_order4
(
ponum character(5) NOT NULL,
qty character(10),
orderdate datetime,
duedate datetime,
receiveddate datetime,
CONSTRAINT purchase_order4_pkey PRIMARY KEY (ponum)
)
--改变前字符长度为5
/*
Column_name Type Computed Length Prec Scale Nullable TrimTrailingBlanks FixedLenNullInSource Collation
-------------------------------------------------------- -------------------------------------------------------- ----------------------------------- ----------- ----- ----- ---------------------------------