Skip to Content
DB2® SQL PL: Essential Guide for DB2® UDB on Linux™, UNIX®, Windows®, i5/OS™, and z/OS®, Second Edition
book

DB2® SQL PL: Essential Guide for DB2® UDB on Linux™, UNIX®, Windows®, i5/OS™, and z/OS®, Second Edition

by Zamil Janmohamed, Clara Liu, Drew Bradstock, Raul Chong, Michael Gao, Fraser McArthur, Paul Yip
November 2004
Intermediate to advanced
576 pages
11h 49m
English
IBM Press
Content preview from DB2® SQL PL: Essential Guide for DB2® UDB on Linux™, UNIX®, Windows®, i5/OS™, and z/OS®, Second Edition

Chapter 7. Working with Dynamic SQL

In this chapter, you will learn

  • The two phases of processing an SQL statement

  • The difference between dynamic SQL and static SQL

  • When and how to use dynamic SQL with the EXECUTE IMMEDIATE statement

  • When and how to use dynamic SQL with PREPARE and EXECUTE

  • The use of dynamic SQL in cursors

  • How to use dynamic CALL statements

  • The use of dynamic SQL for DDL

  • How to use the escape character in dynamic SQL

  • How to use the package cache

Dynamic SQL is a method of SQL programming that allows you to write robust and flexible code. So far, only static SQL has been used in our SQL procedures, and the distinction between dynamic SQL and static SQL has not been made. At this stage, you may not even know that SQL can be classified as static ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IBM DB2 9.7 Advanced Application Developer Cookbook

IBM DB2 9.7 Advanced Application Developer Cookbook

Mohankumar Saraswatipura, Sanjay Kumar
SQL Procedures, Triggers, and Functions on IBM DB2 for i

SQL Procedures, Triggers, and Functions on IBM DB2 for i

Jim Bainbridge, Hernando Bedoya, Rob Bestgen, Mike Cain, Dan Cruikshank, Jim Denton, Doug Mack, Tom Mckinley, Simona Pacchiarini
IBM Db2 11.1 Certification Guide

IBM Db2 11.1 Certification Guide

Robert (Kent) Collins, Mohankumar Saraswatipura

Publisher Resources

ISBN: 0131477005Purchase book