sql server 2008语言基础: 集合
--declare @t table(n int)
--insert into @t values(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)
--select * from @t --返回在2008年1月有订单活动, 而在08年2月没有订单活动的客户和雇员.
--select custid, empid from Sales.Orders where orderdate>='2008-01-01' and orderdate<'2008-02-01'
--except
--select custid, empid from Sales.Orders where orderdate>='2008-02-01' and orderdate<'2008-03-01'--返回在08年1月和2月都有订单活动的客户和雇员
--select custid, empid from Sales.Orders where orderdate>='2008-01-01' and orderdate<'2008-02-01'
--intersect
--select custid, empid from Sales.Orders where orderdate>='2008-02-01' and orderdate<'2008-03-01'--在08年1月和2月有, 在07年没有的客户和雇员
--(select custid, empid from Sales.Orders where orderdate>='2008-01-01' and orderdate<'2008-02-01'
--intersect
--select custid, empid from Sales.Orders where orderdate>='2008-02-01' and orderdate<'2008-03-01'
--)
--except
--select custid, empid from Sales.Orders where orderdate>='2007-1-01' and orderdate<'2008-01-01'select country,region,city from hr.Employees
union all
select country,region,city from Production.Suppliers
转载于:https://www.cnblogs.com/jianjialin/archive/2012/04/11/2442200.html
sql server 2008语言基础: 集合相关推荐
- SQL Server 2008从基础开始学习的历程(1)------创建表与查询
[by:yy] 无论我们学什么呢,都要讲究一个Why,一个How.那么我们为什么要学SQL呢?无非就那么几点. 1.为了适应其他技术,和其他技术配对而学. 我个人的理解呢,只要在IT行业,无论你学什么 ...
- SQL Server 2008基础(自学笔记)
导语:经过一个月的学习,简单的把SQL Server 2008的基础过了一遍,现在进行笔记分享(大一学生自学,如果有错误,欢迎大佬们指正) 一.数据库的创建 1.数据库文件 (1).主要数据文件 包含 ...
- 最佳SQL Server 2008入门教程
媒体评论 "本书是SQL Server数据库初学者的明智选择.它不仅很好地介绍了SQL Server的主要特性,还深入浅出地阐述了数据库开发和设计的一般性概念." --Amazon ...
- 笔记-Microsoft SQL Server 2008技术内幕:T-SQL语言基础-08 数据修改
插入数据 T-SQL提供了几种数据插入的语句:INSERT VALUES.INSERT SELECT.INSERT EXEC.SELECT INTO及BULK INSERT. INSERT VALUE ...
- Analysis Services基础知识——深入SQL Server 2008
Analysis Services基础知识 --深入SQL Server 2008 这一节中,我们将介绍Analysis Services的体系结构,这个体系结构在SQLServer2005中建立,并 ...
- SQL Server 2008空间数据应用系列四:基础空间对象与函数应用
SQL Server 2008空间数据应用系列四:基础空间对象与函数应用 原文:SQL Server 2008空间数据应用系列四:基础空间对象与函数应用 友情提示,您阅读本篇博文的先决条件如下: 1. ...
- SQL Server 2008 基础
SQL Server 2008 基础 SQL流程 TDS是一种协议,一系列描述两个计算机间如何传输数据的规则.象别的协议一样,它定义了传输信息的类型和他们传输的顺序.总之,协议描述了"线上的 ...
- 《Microsoft Sql server 2008 Internal》读书笔记--第八章The Query Optimizer(1)
<Microsoft Sql server 2008 Interna>读书笔记订阅地址: http://www.cnblogs.com/downmoon/category/230397.h ...
- 详细介绍微软SQL Server 2008
SQL Server 2008是一个重大的产品版本,它推出了许多新的特性和关键的改进,使得它成为至今为止的最强大和最全面的SQL Server版本.这篇文章详细介绍了Microsoft SQL Ser ...
最新文章
- 现代密码学5.4--对哈希函数的攻击
- phpcms URL修改
- zend解释php过程,Zend framework处理一个http请求的流程分析
- yum更换本地源、yum下载和源码包安装
- 揭开Vmware 虚拟软件层的秘密
- c语言delay_单片机模拟流星雨,电路图和程序,一起来感受下,其实C语言不难...
- TTU智能配电终端_智能配电终端规模化建设及应用
- 6G尚处于早期研究阶段,长足发展需要时间和耐心
- 留给星巴克的时间不多了
- Failed to parse the output of 'adb version'
- JVM监控及诊断工具命令行篇之jstat
- 接口文档模板(Markdown)
- 数据库可视化软件:Navicat系列
- Scrapy网络爬虫系统
- OBS 电脑推流直播指南
- 批处理清空文件夹内所有txt文件的内容
- RuntimeError: mat1 dim 1 must match mat2 dim 0 报错解决
- ValueError: n_splits=n cannot be greater than the number of members in each class.
- 移动医疗是什么 移动医疗应用实例
- Kubernetes应用场景