读书笔记:SQL SERVER 2008高级编程:批处理和脚本
来源:互联网 发布:新浪邮箱端口号 编辑:程序博客网 时间:2024/05/22 17:29
Chapter 9
批处理和脚本
脚本里可以包含多个批处理。它们之间用GO分开。
But one SQL batch only has one ‘Go’.
SQL Batch 是T-SQL 语句集合的逻辑单元。
Note: ‘ Go’ is not a T-SQLcommand.
GO’s definition:
1. 独立成行
2. 独立发送批处理到服务器
Every batch is independent, so every batch error will not stop other batch’s execution;
Their execution results are: the first and third succeed, but the secondone failed.
3. GO 不是一个T-SQL 语句
所以只有sql server认识Go.
When editor find the ‘Go’ word, it willconsider go as an end flag of one batch, then将其打包,幷将它作为一个单元发送给服务器(不包括GO), theServer self doesn’t know what the “GO” mean.
9.2.1. 批处理错误
批处理错误分为两种:
语法检测时错误(自己理解就是编译时错误)
运行时错误
注意:运行时错误和我们的C#的运行时错误有些不同,出现在运行中出现错误前的所有语句都已经被执行。只有用的是事务除外。
运行时错误会终止批处理继续执行。
9.2.2. When do we use SQL batch
1. 需要批处理的语句
2. 使用批处理简历优先级
在create DataBase Test后一行,要加个GO.
- 读书笔记:SQL SERVER 2008高级编程:批处理和脚本
- SQL Server脚本编写和批处理
- SQL Server 11_编写脚本和批处理
- SQL Server 2008的常用高级脚本
- 批处理安装SQL SERVER 脚本文件
- 理解T-SQL: 脚本和批处理
- SQL Server可写脚本和编程扩展SSIS包
- SQL Server 2008中文版标准教程读书笔记 Transact-SQL编程(复习SQL Server 五)
- 读书笔记c#高级编程 委托和事件
- 批处理合并SQL脚本
- SQL SERVER 2008 编程入门经典读书笔记 -- SQL Server 复杂查询
- bat批处理脚本编程
- SQL Server 2008编程入门经典笔记:脚本
- sql server和sybase中通用的使用BCP倒出当前库中所有表的数据批处理脚本
- 批处理安装SQL Server 2008 R2
- Sql server 批处理
- SQL Server 数据库设计和高级查询
- Sql Server数据库设计和高级查询
- DP动态规划——Litter Shop of Flowers
- Spring之IOC
- 用DrRacket写scheme语言的hello world
- js获取简单类型的json对象键名及值:动态、静态
- MFC 动态曲线 支持缩放 显示图例(CStatic派生类)(续)
- 读书笔记:SQL SERVER 2008高级编程:批处理和脚本
- 如何照顾宝宝
- objective-c 关键字和概念
- Android Launcher开发(五)添加应用程序桌面快捷方常见问题及解决方案
- linux网络高级编程之 fcntl和select使用
- poj 1631 最长上升子序列 nlogn
- Sobel算子边缘检测(vc实现)
- hdu 3714 Error Curves
- 局域网远程桌面使用(基于win7平台)