没有合适的资源?快使用搜索试试~ 我知道了~
db2实例
需积分: 0 2 下载量 42 浏览量
2008-07-06
08:34:21
上传
评论
收藏 1.1MB PDF 举报
温馨提示
试读
371页
英文版实例,对学习有帮助
资源推荐
资源详情
资源评论
DB2 UDB V8.1
SQL Cookbook
Graeme Birchall
23-Jul-2004
Graeme Birchall ©
2
DB2 UDB V8.1 Cookbook ©
Preface 3
Preface
Important!
If you didn’t get this document directly from my website, you may have got an older edition.
The book gets changed all the time, so if you want the latest, go to the source. Also, the latest
edition is usually the best book to have, even if you are using an older version of DB2, as the
examples are often much better.
This Cookbook is for DB2 UDB for Windows, UNIX, LINX, OS/2, etc. It is not suitable for
DB2 for z/OS or DB2 for AS/400. The SQL in these two products is quite different.
Disclaimer & Copyright
DISCLAIMER: This document is a best effort on my part. However, I screw up all the time,
so it would be extremely unwise to trust the contents in its entirety. I certainly don’t. And if
you do something silly based on what I say, life is tough.
COPYRIGHT: You can make as many copies of this book as you wish. And I encourage you
to give it to others. But you cannot sell it, nor charge for it (other than to recover reproduction
costs), nor claim the material as your own, nor replace my name with another. Secondary dis-
tribution for gain is not allowed. You are also encouraged to use the related class notes for
teaching. In this case, you can charge for your time and materials (and your expertise). But
you cannot charge any licensing fee, nor claim an exclusive right of use.
TRADEMARKS: Lots of words in this document, like "DB2", are registered trademarks of
the IBM Corporation. And lots of other words, like "Windows", are registered trademarks of
the Microsoft Corporation. Acrobat is a registered trademark of the Adobe Corporation.
Tools Used
This book was written on a Dell PC that came with oodles or RAM. All testing was done on
DB2 V8.1.4. Word for Windows was used to write the document. Adobe Acrobat was used to
make the PDF file. As always, the book would have been written in half the time if Word for
Windows wasn’t such a bunch of bug-ridden junk.
Book Binding
This book looks best when printed on a doubled sided laser printer and then suitably bound.
To this end, I did some experiments a few years ago to figure out how to bind books cheaply
using commonly available materials. I came up with what I consider to be a very satisfactory
solution that is fully documented on page 365.
Author / Book
Author: Graeme Birchall ©
Address: 1 River Court, Apt 1706
Jersey City NJ 07310-2007
Ph/Fax: (201)-963-0071
Email: Graeme_Birchall@compuserve.com
Web: http://ourworld.compuserve.com/homepages/Graeme_Birchall
Title: DB2 UDB V8.1 SQL Cookbook ©
Date: 23-Jul-2004
Graeme Birchall ©
4
Author Notes
Book History
This book originally began a series of notes for my own use. After a while, friends began to
ask for copies, and enemies started to steal it, so I decided to tidy everything up and give it
away. Over the years, new chapters have been added as DB2 has evolved, and I have found
new ways to solve problems. Hopefully, this process will continue for the foreseeable future.
Why Free
This book is free because I want people to use it. The more people that use it, and the more
that it helps them, then the more inclined I am to keep it up to date. For these reasons, if you
find this book to be useful, please share it with others.
This book is free, rather than formally published, because I want to deliver the best product
that I can. If I had a publisher, I would have the services of an editor and a graphic designer,
but I would not be able to get to market so quickly, and when a product changes as quickly as
DB2 does, timeliness is important. Also, giving it away means that I am under no pressure to
make the book marketable. I simply include whatever I think might be useful.
Other Free Documents
The following documents are also available for free from my web site:
• SAMPLE SQL: The complete text of the SQL statements in this Cookbook are available
in an HTML file. Only the first and last few lines of the file have HTML tags, the rest is
raw text, so it can easily be cut and paste into other files.
• CLASS OVERHEADS: Selected SQL examples from this book have been rewritten as
class overheads. This enables one to use this material to teach DB2 SQL to others. Use
this cookbook as the student notes.
• OLDER EDITIONS: This book is rewritten, and usually much improved, with each new
version of DB2. Some of the older editions are available from my website. The others can
be emailed upon request. However, the latest edition is the best, so you should probably
use it, regardless of the version of DB2 that you have.
Answering Questions
As a rule, I do not answer technical questions because I need to have a life. But I’m interested
in hearing about interesting SQL problems, and also about any bugs in this book. However
you may not get a prompt response, or any response. And if you are obviously an idiot, don’t
be surprised if I point out (for free, remember) that you are idiot.
Graeme
DB2 UDB V8.1 Cookbook ©
Book Editions 5
Book Editions
Upload Dates
• 1996-05-08: First edition of the DB2 V2.1.1 SQL Cookbook was posted to my web site.
This version was is Postscript Print File format.
• 1998-02-26: The DB2 V2.1.1 SQL Cookbook was converted to an Adobe Acrobat file
and posted to my web site. Some minor cosmetic changes were made.
• 1998-08-19: First edition of DB2 UDB V5 SQL Cookbook posted. Every SQL statement
was checked for V5, and there were new chapters on OUTER JOIN and GROUP BY.
• 1998-08-26: About 20 minor cosmetic defects were corrected in the V5 Cookbook.
• 1998-09-03: Another 30 or so minor defects were corrected in the V5 Cookbook.
• 1998-10-24: The Cookbook was updated for DB2 UDB V5.2.
• 1998-10-25: About twenty minor typos and sundry cosmetic defects were fixed.
• 1998-12-03: IBM published two versions of the V5.2 upgrade. The initial edition, which
I had used, evidently had a lot of problems. It was replaced within a week with a more
complete upgrade. This book was based on the later upgrade.
• 1999-01-25: A chapter on Summary Tables (new in the Dec/98 fixpack) was added and
all the SQL was checked for changes.
• 1999-01-28: Some more SQL was added to the new chapter on Summary Tables.
• 1999-02-15: The section of stopping recursive SQL statements was completely rewritten,
and a new section was added on denormalizing hierarchical data structures.
• 1999-02-16: Minor editorial changes were made.
• 1999-03-16: Some bright spark at IBM pointed out that my new and improved section on
stopping recursive SQL was all wrong. Damn. I undid everything.
• 1999-05-12: Minor editorial changes were made, and one new example (on getting mul-
tiple counts from one value) was added.
• 1999-09-16: DB2 V6.1 edition. All SQL was rechecked, and there were some minor ad-
ditions - especially to summary tables, plus a chapter on "DB2 Dislikes".
• 1999-09-23: Some minor layout changes were made.
• 1999-10-06: Some bugs fixed, plus new section on index usage in summary tables.
• 2000-04-12: Some typos fixed, and a couple of new SQL tricks were added.
• 2000-09-19: DB2 V7.1 edition. All SQL was rechecked. The new areas covered are:
OLAP functions (whole chapter), ISO functions, and identity columns.
• 2000-09-25: Some minor layout changes were made.
• 2000-10-26: More minor layout changes.
• 2001-01-03: Minor layout changes (to match class notes).
• 2001-02-06: Minor changes, mostly involving the RAND function.
剩余370页未读,继续阅读
资源评论
dashi99
- 粉丝: 76
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- pta题库答案c语言之排序4统计工龄.zip
- pta题库答案c语言之树结构7堆中的路径.zip
- pta题库答案c语言之树结构3TreeTraversalsAgain.zip
- pta题库答案c语言之树结构2ListLeaves.zip
- pta题库答案c语言之树结构1树的同构.zip
- 基于C++实现民航飞行与地图简易管理系统可执行程序+说明+详细注释.zip
- pta题库答案c语言之复杂度1最大子列和问题.zip
- 三维装箱问题(Three-Dimensional Bin Packing Problem,3D-BPP)是一个经典的组合优化问题
- 以下是一些关于Linux线程同步的基本概念和方法.txt
- 以下是一个简化的示例,它使用pygame库来模拟烟花动画的框架.txt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功