Book Details
Format
Kindle
Pages
283
Language
English
Published
May 15, 2013
Publisher
Joes 2 Pros International
Description
The Common Table Expression (CTE) is one of the morepowerful and often overlooked features in MicrosoftSQL Server. This Joes 2 Pros book will show some ofthe more interesting things you can do with a CTE. Wewill learn how CTEs are a great alternative to derivedtable queries, how to do data paging with a CTE, andrecursive queries with tree path and hierarchical output.This book will also cover how to use the DELETE,UPDATE, and INSERT statements with a CTE, and howto use CTEs in stored procedures and functions. We willdiscover what is good and bad with CTEs when it comesto performance, and how to avoid performance pitfalls.The twelve chapters take us from the most basicintroduction of a CTE all the way to the more complexusage scenarios where a CTE can change the way youlook at writing T-SQL queries. Learn how to use a singleCTE or multiple CTEs in a single statement as well asnesting them.