日期:2014-05-17 浏览次数:20372 次
CREATE TABLE [dbo].[t_user](
[id] [nchar](10) NOT NULL,
[name] [nchar](10) NOT NULL,
[money] [int] NOT NULL,
[time] [datetime] NOT NULL,
CONSTRAINT [PK_t_user] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[t_user] ADD CONSTRAINT [DF_t_user_time] DEFAULT (getdate()) FOR [time]
GO
id name money time
1 zhangsan 100 2013-03-04 16:45:55.760
2 lisi 110 2013-03-04 16:46:09.917
3 wangwu 120 2013-04-04 16:56:42.343
4 zhangsan 80 2013-05-04 16:56:54.123
5 zhangsan 263 2013-06-04 16:57:02.230
6 lisi 64 2013-06-04 16:57:11.950
7 wangwu 265 2013-07-04 16:57:21.850
8 lisi 264 2013-07-04 16:57:32.730
id name money time
5 zhangsan 263 2013-06-04 16:57:02.230
7 wangwu 265 2013-07-04 16:57:21.850
8 lisi 264 2013-07-04 16:57:32.730