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
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-SQL1. Introduction to Transact-SQL2. Matching Business Rules3. SQL Primer4. Transact-SQL Fundamentals5. Format and StylePART II: The Building Blocks: Transact-SQL Language Elements6. Datatypes and Variables7. Conditional Processing8. Row Processing with Cursors9. Error Handling10. Temporary Objects11. Transactions and LoggingPART III: Functions and Extensions12. Functions13. CASE Expressions and Transact-SQL ExtensionsPART IV: Programming Transact-SQL Objects14. Stored Procedures and Modular Design15. Triggers16. Views17. System and Extended Stored Procedures and BCPPART V: Performance Tuning and Optimization18. Transact-SQL Code Design19. Code Maintenance in the SQL Server20. Transact-SQL Optimization and Tuning21. Debugging Transact-SQL ProgramsPART VI: AppendixesA. System TablesB. What's New for Transact-SQL in Microsoft SQL Server 7.0? C. BCPThe 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.
Kevin Kline is the Technical Strategy Manager for SQL Server Solutions at Quest Software, a leading provider of award winning tools for database management and application monitoring tools. Kevin is also a founding board member and former President of the international Professional Association for SQL Server (PASS) and frequently contributes to database technology magazines, web sites, and discussion forums. Kevin's most popular book is SQL in a Nutshell published by O'Reilly Media. Kevin is also the author of monthly magazine columns for SQL Server Magazine and Database Trends & Applications. Kevin is a top rated speaker, appearing at international conferences like Microsoft TechEd, DevTeach, PASS, Microsoft IT Forum, and SQL Connections.
Lee Gould is a principal consultant with Sybase Professional Services in New York where she works mainly in the financial services industry on Wall Street. She has been working with SQL Server since 1992 and has been involved in the computer industry for over ten years. She has published numerous articles in Microsoft SQL Server Professional (Pinnacle Publishing) and presented on a variety of topics at the International Sybase User Group and Powersoft conferences. Lee was born in Liverpool, England. She grew up in Johannesburg, South Africa, where she attended the University of Witwatersrand and received her bachelors of commerce in business information systems. Lee immigrated to America four years ago and is currently pursuing an MBA at Seton Hall University in New Jersey. Lee lives in the suburb of North Brunswick, New Jersey, with her two cats, Lady and Paganini. She can often be seen running, cycling, swimming, and horseriding while she trains for marathons and ultra triathlon events. When not immersed in sport, Lee is an avid fan of classical music, good wine, the piano, science fiction and Terminator II. Her motto on life is "carpe diem," which she endeavors to follow regardless of where it leads her. Lee can be contacted at firstname.lastname@example.org.
Andrew Zanevsky, an independent consultant and founder and president of AZ Databases, Inc., has been working with SQL Server since 1992. He writes a monthly column "Super Administrator," for Microsoft SQL Server Professional (Pinnacle Publishing) and has published more than a hundred technical articles throughout his career. He immigrated to the United States from Minsk, Belarus in 1991. He started programming in 1982 and holds a degree from the Belarus State University of Informatics and Radioelectronics (equivalent to an M.S. in computer science). Andrew lives in a suburb of Chicago with his wife Katrin, son Anthony, and stepdaughter Esther. Katrin is also a SQL Server consultant. They work on some projects together and can talk about Transact-SQL at dinner. Andrew's daughter Nikkie lives in New York, wants to be a writer, and has won numerous awards in art contests. Andrew was the president of the Great Lakes SQL Server Users Group in Chicago from 1994 through 1997. He can be reached at email@example.com.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animals on the cover of Transact-SQL Programming are wallcreepers (Tichodrama muraria), colorful nuthatches with two subspecies, whose habitat is the alpine regions from Eurasia to North Africa. The wallcreeper is a rock dweller, and seeks food by climbing in its native rocks and ravines-hence the name. Its hind toes have long claws with which the bird can grasp small protrusions. While climbing, wallcreepers flap their wings, showing brief glimpses of a red band of feathers; this coloring is intensified in males during mating season. An adult wallcreeper is about seven inches long. Its nests are built of feathers, moss, and other materials found in the rock cliffs. Jeffrey Liggett was the production editor for Transact-SQL Programming; Sheryl Avruch was the production manager; Norma Emory was the copyeditor; Ellie Maden, Sarah Jane Shangraw, and Melanie Wang provided quality control. Robert Romano created the illustrations using Adobe Photoshop 5 and Macromedia FreeHand 8. Mike Sierra provided FrameMaker technical support. Ruth Rautenberg wrote the index.Edie Freedman designed the cover of this book, using a 19th-century engraving from the Dover Pictorial Archive. The cover layout was produced with QuarkXPress 3.32 using the ITC Garamond font. Hanna Dyer designed the CD label. Whenever possible, our books use RepKover(TM), a durable and flexible lay-flat binding. If the page count exceeds RepKover's limit, perfect binding is used.The inside layout was designed by Nancy Priest and implemented in FrameMaker 5.5 by Mike Sierra. The text and heading fonts are ITC Garamond Light and Garamond Book. This colophon was written by Nancy Kotary.
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.
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...