建表时如何给列设置默认值?
建表时如何给列设置默认值?请给个代码,谢谢!!!
------解决方案--------------------CREATE TABLE [Files] (
[id] [bigint] IDENTITY (1, 1) NOT NULL,
[FileName] [varchar] (100) NULL,
[FileAuthor] [varchar] (50) NULL,
[AuthorGroup] [varchar] (100) NULL,
[Up_Date] [datetime] NULL DEFAULT (getdate()),
[issue] [bit] NULL DEFAULT (0),
[Type] [varchar] (50) NULL)
其中的DEFAULT (0)和DEFAULT (getdate())就是默认值