日期:2014-05-17 浏览次数:20750 次
----------------------------
-- Author :DBA_Huangzj(發糞塗牆)
-- Date :2013-09-10 09:49:43
-- Version:
-- Microsoft SQL Server 2014 (CTP1) - 11.0.9120.5 (X64)
-- Jun 10 2013 20:09:10
-- Copyright (c) Microsoft Corporation
-- Enterprise Evaluation Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)
--
----------------------------
--> 测试数据:[TabelA]
if object_id('[TabelA]') is not null drop table [TabelA]
go
create table [TabelA]([name] varchar(8),[b_type] varchar(1),[qty] int)
insert [TabelA]
select '外套画报','B',10 union all
select '外套画报','C',5
--> 测试数据:[TabelB]
if object_id('[TabelB]') is not null drop table [TabelB]
go
create table [TabelB]([id] int,[b_type] varchar(1))
insert [TabelB]
select 1,'A' union all