[SQL] 纯文本查看 复制代码
create table #user
(
MyUserID int not null,
CompanyName varchar(100) not null
)
insert into #user values(1,'')
insert into #user values(2,'')
insert into #user values(3,'')
insert into #user values(4,'')
[SQL] 纯文本查看 复制代码
create table #work
(
MyUserID int not null,
BeginDate varchar(10) not null,
EndDate varchar(10) not null,
CompanyName varchar(100) not null
)
insert into #work values(1,'2012-09','2015-06','公司1')
insert into #work values(1,'2008-09','2012-06','公司2')
insert into #work values(2,'2012-09','2015-06','公司3')
insert into #work values(2,'2008-09','2012-06','公司4')
insert into #work values(3,'2012-09','2015-06','公司5')
insert into #work values(3,'2008-09','2012-06','公司6')
insert into #work values(3,'2007-09','2008-06','公司7')
insert into #work values(3,'2012-09','2015-06','公司8')
insert into #work values(4,'2012-09','2015-06','公司9')
insert into #work values(4,'2008-09','2012-06','公司10')