--创建表
CREATE TABLE dbo.Tab
(
ID int NOT NULL IDENTITY (1, 1),
Y varchar(20) NOT NULL,
X datetime NOT NULL
)
GO
--插入数据
INSERT INTO Tab(Y, X) values('BBB', '2007-10-23 11:11:11')
INSERT INTO Tab(Y, X) values('BBB', '2007-10-23 11:11:11')
INSERT INTO Tab(Y, X) values('BBB', '2007-10-23 10:10:10')
INSERT INTO Tab(Y, X) values('AAA', '2007-10-23 12:12:12')
INSERT INTO Tab(Y, X) values('AAA', '2007-10-23 10:10:10')
INSERT INTO Tab(Y, X) values('AAA', '2007-10-23 11:11:11')
GO |