BUY THIS BOOK
This print book is out of stock, with no immediate plans to reprint.

Transact-SQL Programming Covers Microsoft SQL Server 6.5 /7.0 and Sybase Adaptive Server 11.5

By Kevin Kline, Lee Gould, Andrew Zanevsky
April 1999
Pages: 836
ISBN 10: 1-56592-401-0 | ISBN 13: 9781565924017
starstarstarstarstar (Average of 3 Customer Reviews)

Buy 2 Get 1 Free Free ShippingGuarantee

Book description

Full of examples, best practices, and real-world advice, this book thoroughly explores Transact-SQL, a full-featured procedural language that extends the power of SQL on both Microsoft SQL Server 6.5/7.0 and Sybase version 11.5. Comes with a CD-ROM containing extensive examples.
Full Description

Transact-SQL is a procedural language used on both Microsoft SQL Server and Sybase SQL Server systems. It is a full-featured programming language that dramatically extends the power of SQL (Structured Query Language). The language provides programmers with a broad range of features, including:
  • A rich set of datatypes, including specialized types for identifiers, timestamps, images, and long text fields
  • Local and global variables
  • Fully programmable server objects like views, triggers, stored procedures, and batch command files
  • Conditional processing
  • Exception and error handling
  • Full transaction control
  • System stored procedures that reduce the complexity of many operations, like adding users or automatically generating HTML Web pages
In recent years, the versions of Transact-SQL have diverged on Microsoft and Sybase systems; the book explains the differences. It also contains up-to-the-minute information on the latest versions: Microsoft SQL Server versions 6.5 and 7.0 and Sybase version 11.5. A brief table of contents follows: PART I: The Basics: Programming in Transact-SQL 1. Introduction to Transact-SQL 2. Matching Business Rules 3. SQL Primer 4. Transact-SQL Fundamentals 5. Format and Style PART II: The Building Blocks: Transact-SQL Language Elements 6. Datatypes and Variables 7. Conditional Processing 8. Row Processing with Cursors 9. Error Handling 10. Temporary Objects 11. Transactions and Logging PART III: Functions and Extensions 12. Functions 13. CASE Expressions and Transact-SQL Extensions PART IV: Programming Transact-SQL Objects 14. Stored Procedures and Modular Design 15. Triggers 16. Views 17. System and Extended Stored Procedures and BCP PART V: Performance Tuning and Optimization 18. Transact-SQL Code Design 19. Code Maintenance in the SQL Server 20. Transact-SQL Optimization and Tuning 21. Debugging Transact-SQL Programs PART VI: Appendixes A. System Tables B. What's New for Transact-SQL in Microsoft SQL Server 7.0? C. BCP The book comes with a CD-ROM containing an extensive set of examples from the book and complete programs that illustrate the power of the language.
Post-purchase benefits:

Register your book | Submit Errata | Updates | Examples


Browse within this book

Cover | Table of Contents | Index | Sample Chapter | Colophon

Book details

First Edition: April 1999
ISBN: 1-56592-401-0
Pages: 836
Average Customer Reviews: starstarstarstarstar (Based on 3 Reviews)


Featured customer reviews

Write a Review


Transact-SQL Programming Review,  March 15 2004
Rating: StarStarStarStarStar
Submitted by rohan Pitiya   [Respond | View]

REgarding the article publish in sqlservercentrl on t-sql performance tunining Part -2 which is an extract from this book....

1.It says on p12, by adding anotther constraint( p.productid = s.productid) in the where clause you get a perfomace boost. If SQL server doesn't know A=c when A=B and B=C, then sql has to check this which means an added overhead(redundant) to the the query. In my experiecnce I have removed lot of this type redunant filterations which boosted performance(opposite to the argument)

2. When using OR replacing with UNION queries..

this again if you have or statements in one query, when sql evaluates from left to right, the first neagative condition will end the checking. But as you indicate, irrespective of results, sql has to evaluvate for all coditions in the OR clause.


Transact-SQL Programming Review,  July 16 2003
Rating: StarStarStarStarStar
Submitted by Matt   [Respond | View]

This book is now extrememly out of date. The datatypes are not even up to date with SQL Server 2000. You need a new version of this book that is up to date. $50 is also way to much for a book that is now two versions behind (because this doesn't even cover version 7.0 completely). I have come to expect better from O'Reilly...


Transact-SQL Programming Review,  September 30 2000
Rating: StarStarStarStarStar
Submitted by Mike T.   [Respond | View]

Down-to-earth and practical manual. It is comparable with

'PL/SQL Oracle programming' book that Oreilly sells in

its scope, accuracy, and depth of coverage.

I recommend this book for anyone with experience in procedural

SQL-based languages new to Transact-SQL environment. The

presentation is layed out logically and in well-paced units.

Some humor is sprinkled at the right frequency to keep material

from becoming desert-dry.

------------

Mike

Read all reviews


Transact-SQL Programming Review,  March 01 2000
Submitted by Jan Garefelt   [Respond | View]



This book is the first O'Reilly book that has disappointed me. A normal O'Reilly book is short and to the point, while this book is tedious and far too long.

The book is full of blablabla like the following:

'Stored procedures are to programmers what steriods are to many bodybuilders; you don't get anywhere without them. Once you acknowledge this, you need to learn how to abuse them as much as they abuse you.' (p 437)

The book does contain useful information but it is a pain to anything of worth in it unless you share the authors sense of humour. If you haven't bought the book I suggest that you find another.


Transact-SQL Programming Review,  October 29 1999
Submitted by Dick Warg   [Respond | View]



Programming Transact SQL is one of the best and most useful computer books I have come across in 35 years of living with a manual in my lap. It's fun to read(if you're a geek), it's accurate, it's thorough, it's programmer friendly. It doesn't waste my time or leave me reaching for another reference in the middle of a task. I've urged my children and friends(the ones working on database projects) to buy it. The authors really know their stuff. I'm impressed and pleased.


Transact-SQL Programming Review,  October 15 1999
Submitted by Robert N. Litsinger   [Respond | View]



Excellent and complete. I've read a series of books on SQL and this is the only one that really explains the details in a manner which is readable. Not only is it very readable, it is also an terrific reference manual. I find that to be an unusual achievement for a technical book. However, those new to SQL might find the level of information overwealming and might want to read an introductory book first. Still, they should definitely read this one next!


Transact-SQL Programming Review,  July 28 1999
Submitted by Perry S.   [Respond | View]



Finished reading this book in a month, about a fortnight or so ago, and have been accruing this review bit by bit since then. Hope it formats well into this html Textarea control...

My RDMS setup: running MS SQL Server 6.5 on a PC running NT4.0 Member Server as the sa.

The book accomplishes what the authors said it would in the preface. When books basically live up to their preface, and the preface is truthful, and, at least fairly accurate, then it is difficult for me to fault a book's author(s). Afterall, as a reader I cannot say I did not know what the book was about after reading the preface carefully. If I did not read the preface I am getting pretty much what I deserve, I suppose. If I find fault with a book that has an accurate preface then the odds are good I am saying the book is not something it never claimed to be. It would be like saying, "Don't buy _Transact-SQL_Programming_ because it is a terrible automatic transmission repair manual!"....

On the whole, chapters are a consistent length. This made scheduling reading time for what some might consider a dryasdust subject that much easier. Another notable thing about the overall chapter construction is the lack of 'run-on' chapters. For me this is often a good initial indicator the author(s) understand how to divide and conquer the subject at hand to the learner's benefit. No disappointment on this score.

The authors deserve praise for sticking with the stock pubs and system databases in their sample code and concept explanations. On the rare occasions when they do not the reader is warned and reasons given. If you groan at the thought of spending 800 pages with everyone's favorite sample database ( it could be worse, ever hear the NorthWind? ) then please stop to consider all the benefits that accompany a tried and tested sample database. Besides the obvious harddrive space saved, there is the advantage of being able to quickly spot misspelled column names and other errata in the sample code your reading or typing in as you follow along with the book, it is easier for the reader to transition to the online help files to further research something intriguing in the book ( go ahead and admit it, if you liked reading Microsoft online help files you would probably not be thinking about buying this book ), you rarely have to worry about the unknown flaws in the sample data ( millions of other users have already relieved you of that concern ), nor do you have to burn blood-sugar struggling to understand someone else's obscure data set when yours is already hard enough ( nor do you have to waste time trying to introduce a strange data set to anyone else when you ask them to try and explain the author's code, as everyone is already familiar with pubs, and if they are not, you are possibly asking the wrong person ). Be certain, there are more reasons to be glad the author(s) stayed with pubs.

Whether it is a result of sticking with the standard sample data set, a question of style, or a combination of both, this book does an excellent job, from start to finish, of not obscuring (rather unlike this rambling review...) the pedagogical concepts with needlessly complex SQL code examples. Whenever I see examples of this unusual occurrence consistently applied in a computer book I become immediately suspicious that the writer(s) are both wiser and more knowledgeable about that upon which they write than they are letting on. You have been warned.

What about errata? Inquiring minds want to know...? I did not test every single line of sample code in the book or on the CD by any means, yet, and I say this from the dim recesses of my memory, I did not encounter any error of the sort one might call a serious *logic* error. I do not consider a misspelled column name or variable, an occasional missing space betwixt a property and it's value, a forgotten quote mark, dyslexic data entry moments, or neglecting to declare a variable to be serious logic errors. Do you? *Logic* errors shake my confidence in the coder-writer's thinking processes ( thank-god I never bother to read my own code! ). My confidence was pretty steady last time I checked ( Is it folly to be wise where ignorance is bliss? I wonder... ). Personally, I like an obscure typo now and again. Besides helping to keep my reading-brain from slipping into neutral as it is wonted to do, where else can I get that cheap and quick dose of righteousness with so little effort or personal risk that comes with firing off an errata report to booktech@oreilly.com ? ( Handy tip for the quick fix self-righteousness junkies: Read the books as soon as they become available so you don't have to feel obligated to read the posted errata sheets first, and so possibly suffer the bitter taste of righteousness-lost. Of course, *real programmers* prefer to wait until the tenth edition cause then finding an errata is the deed of a manly man. ) In fine, the team responsible for this first edition deserves congratulations for their meticulous attention to detail and craftsmanship.

One thing I remember caused me to pause and scrutinize a bit more thoroughly than usual before buying this book. It was the 'admission' on the cover that more than one vendor's product was covered within. Now anybody with a computer book habit must shudder when they see this. Even if they know the history of T-SQL. You know the saying, "twice burned is best learned". How many publishers seem to think that the transition in the coverage of one vendor to another vendor is the perfect opportunity to waste the better part of three pages on HEADINGS and copious whitespace always amazes me. It was a constant source of pleasure to see how efficiently the O'Reilly team handled this and other potential page padding scenarios. It is so well done that you'll hardly even notice the dual coverage. Best of all, the topic sentence of the paragraph will inform you immediately if it's contents are vendor specific so you'll quickly become skilled at moving onto the next applicable paragraph. Not that this happens all that often (although it is hard to imagine MS and Sybase releasing many more versions where a book that covers both is still feasible, yet, that is years away so why worry?). For those of you new to O'Reilly ( for those of you not, I apologize for stating the obvious about O'Reilly publications ) who are used to the typical books produced for Microsoft products don't be alarmed at the complete lack of useless, vapid, insipid, stupid excuses to waste space with three-quarters-of-a-page-GUI-screenshots in all 807 pages of this first edition. Instead rejoice, for you have exchanged your money for potential content and not something you have access to by default via the application in question. So do not think you are paying for 800 pages and only will use 400 pages because your interested in only one vendor. You will get your 749 pages worth! The book rigorously follows a consistent structure for the presentation of vendor specific information which facilitates the vendor specific reader's task without *any* unnecessary page padding!

Is there anything not to like about _TSQL_Programming_ ? Sure, the index is wimpy. Of course, I have never met any printed index I thought was complete enough, short of a 19th century concordance or two. You have been warned. Now you know to keep a sharp pencil handy when you read. The fault is not so much the lack of subject/keyword references, but the paucity of pages listed for the included subjects/keywords. When I update indexes it is to enhance the future usefulness of a book as a reference source. In this case I focused on command keywords, stored procedures, and system tables as they occured in T-SQL code examples throughout the book. You will benefit from making a new index entry just for references throughout the text to the code on the CD. When a book is of sufficient quality, as this book is, this small effort on the reader's part is time well spent.

... It looks like I better post this before the second edition gets published. Happy reading.



Transact-SQL Programming Review,  May 19 1999
Submitted by Max Shapiro   [Respond | View]



Well written and organized book covering all the important topics that I will need to refer to as get into a SQL Server DBA role. Good job by the authors.


Transact-SQL Programming Review,  May 14 1999
Submitted by Romas Peleckas   [Respond | View]



Transact-SQL Programming is the first book to effectively cover all topics about Transact-SQL (from Transact-SQL fundamentals to code design and performance tuning). The talent and experience amongst the three authors is well reflected in the quality of the material in this book. This book is a "must have" if you're a database analyst or programmer who works with Microsoft SQL Server or Sybase Adaptive Server.



Media reviews

"I've finally found a replacement for the T-SQL manual that comes with MS SQL Server (or did way back when). The product manual is great because you can learn T-SQL quickly without wading through a lot of stuff you don't need. But I must admit at times, the product manual has fallen short in the more complicated SQL manipulations. This new O'Reilly book (the cover is of wallcreepers--birds from North Africa) is great because it covers the T-SQL stuff including the more complex stuff but is also covers the intro concepts, admin, and debugging material...I'm looking forward to moving beyond the simple SPs and data base design to the next level. This book will take me there."
--Dina Berry, 4guysfromrolla.com, Jul 31 1999

"This practical tutorial and text is suitable for self-study or class environments. It contains clear code, examples, tables, notes and a case study to further enhance the learning process. The examples are not only well explained and relevant for administrators and developers, but also include the result set to keep you on track." -fatbrain.com

"When Transact SQL Programming by Kevin Kline, Lee Gould, and Andrew Zanexsky came out, it quickly became the first place I look for SQL Server code. I find it a gold mine, week in and week out. Almost anytime I'd dig into it, I'd find something of value." --Martin Heller, Byte.com, March 7, 2001

Hide extended reviews


See larger cover