日期:2014-05-17 浏览次数:20728 次
----------------------------
-- Author :TravyLee(两情若是久长时,又岂在朝朝暮暮!)
-- Date :2013-03-11 13:19:25
-- Version:
-- Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64)
-- Jul 9 2008 14:17:44
-- Copyright (c) 1988-2008 Microsoft Corporation
-- Developer Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
--
----------------------------
--> 测试数据:[a]
if object_id('[a]') is not null
drop table [a]
go
create table [a]
(
[员工ID] int,
[姓名] varchar(4),
[班组] int
)
insert [a]
select 1,'张三',1 union all
select 2,'李四',1 union all
select 3,'王二',2
--> 测试数据:[b]
if object_id('[b]') is not null
drop table [b]
go
create table [b]
(
[员工ID] int,
[打卡时间] datetime,
[打卡机号] int
)
insert&nbs