日期:2014-05-17 浏览次数:20553 次
----------------------------
-- Author :DBA_Huangzj(發糞塗牆)
-- Date :2013-08-13 11:47:11
-- 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)
--
----------------------------
--> 测试数据:[tb1]
if object_id('[tb1]') is not null drop table [tb1]
go
create table [tb1]([ID] int,[NAME] varchar(2),[Code] varchar(1))
insert [tb1]
select 12,'xx','w' union all
select 13,'dd','x' union all
select 14,'ee','r' union all
select 15,'cc','g' union all
select 16,'vv','e'
--------------开始查询--------------------------