在插入数据时利用默认值

USE HrSystem

GO

ALTER TABLE Employees ADD InputDatetime datetime DEFAULT(getdate())

GO

 

USE HrSystem

GO

INSERT INTO Employees (Emp_Name,Sex,Title,IdCard,Wage,Dep_Id)

values('小李','男','职员','210123456789',2500,2)

GO

 

 

posted @ 2012-04-03 15:17  KingNiu  阅读(291)  评论(0编辑  收藏  举报