Column level vs table level constraints in sql server?

前端 未结 4 943
逝去的感伤
逝去的感伤 2021-02-07 19:43

a. Column Level

GO

CREATE TABLE Products
(
ProductID INT CONSTRAINT pk_products_pid PRIMARY KEY,
ProductName VARCHAR(25)
);

GO

b.

4条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-07 20:13

    There are two ways to define constraints one is at column level and the other is at table level.one can use any of these methods to apply constrains.

提交回复
热议问题