Dynamic SQL

Applications, Performance, and Security in Microsoft SQL Server

  • Edward Pollack

Table of contents

  1. Front Matter
    Pages i-xx
  2. Edward Pollack
    Pages 1-30
  3. Edward Pollack
    Pages 31-60
  4. Edward Pollack
    Pages 61-102
  5. Edward Pollack
    Pages 103-163
  6. Edward Pollack
    Pages 165-191
  7. Edward Pollack
    Pages 193-255
  8. Edward Pollack
    Pages 257-278
  9. Edward Pollack
    Pages 279-326
  10. Edward Pollack
    Pages 327-360
  11. Edward Pollack
    Pages 361-390
  12. Edward Pollack
    Pages 391-420
  13. Edward Pollack
    Pages 421-485
  14. Back Matter
    Pages 487-496

About this book


Take a deep dive into the many uses of dynamic SQL in Microsoft SQL Server. This edition has been updated to use the newest features in SQL Server 2016 and SQL Server 2017 as well as incorporating the changing landscape of analytics and database administration. Code examples have been updated with new system objects and functions to improve efficiency and maintainability.

Executing dynamic SQL is key to large-scale searching based on user-entered criteria. Dynamic SQL can generate lists of values and even code with minimal impact on performance. Dynamic SQL enables dynamic pivoting of data for business intelligence solutions as well as customizing of database objects. Yet dynamic SQL is feared by many due to concerns over SQL injection or code maintainability. 

Dynamic SQL: Applications, Performance, and Security in Microsoft SQL Server helps you bring the productivity and user-satisfaction of flexible and responsive applications to your organization safely and securely. Your organization’s increased ability to respond to rapidly changing business scenarios will build competitive advantage in an increasingly crowded and competitive global marketplace. With a focus on new applications and modern database architecture, this edition illustrates that dynamic SQL continues to evolve and be a valuable tool for administration, performance optimization, and analytics.

What You'ill Learn:

  • Build flexible applications that respond to changing business needs
  • Take advantage of creative, innovative, and productive uses of dynamic SQL
  • Know about SQL injection and be confident in your defenses against it
  • Address performance concerns in stored procedures and dynamic SQL
  • Troubleshoot and debug dynamic SQL to ensure correct results
  • Automate your administration of features within SQL Server


Dynamic SQL SQL Server T-SQL SQL Injection Pivot Search Unpivot Performance Tuning Security Dynamic Data Analytics Cross-Server Queries Cross-Database Queries Microsoft SQL Server

Authors and affiliations

  • Edward Pollack
    • 1
  1. 1.AlbanyUSA

Bibliographic information