日期:2014-05-18 浏览次数:20514 次
--建表: CREATE TABLE #T1 ( kehu varchar(10) not null, leixing varchar(10) not null, yingshou int not null, huankuan int, yingshouri datetime, shishouri datetime, fakuan int ) go insert into #T1 Select '甲','A',20,'','2012-05-10','','' UNION Select '甲','A',30,'','2012-05-10','','' UNION Select '甲','B',40,'','2012-05-18','','' UNION Select '甲','B',50,'','2012-05-12','','' UNION Select '已','C',60,'','2012-05-13','','' UNION Select '已','C',70,'','2012-05-20','','' UNION Select '已','D',80,'','2012-05-18','','' Select * from #T1