TL;DR Summary: Table and row functions in Db2 12 enhance database management by providing efficient data querying and manipulation tools. Key features include ADMIN_TASK_LIST for managing administrative tasks, XMLTABLE for querying XML data, and UNPACK for extracting values from expressions.
- ADMIN_TASK_LIST provides a list of administrative tasks.
- XMLTABLE allows querying XML data as relational data.
- UNPACK function extracts values from complex expressions.
Table Functions
ADMIN_TASK_LIST
>_ADMIN_TASK_LIST()_______________________________________________________>
ADMIN_TASK_OUTPUT
>_ADMIN_TASK_OUTPUT(_task-name_,_num-invocations)_________________________>
ADMIN_TASK_STATUS
>_ADMIN_TASK_STATUS(____________________)_________________________________>
ǀ_max-history_ǀ
XMLTABLE
>_XMLTABLE_(______________________________row-xquery-expression-constant___>
ǀxmlnamespaces-declaration_,_ǀ
>__________________________________________________________________________>
ǀ <__ ,____________________________ ǀ ǀ _BY REF_ ǀ ǀ ǀ_PASSING_ǀ________ǀ_____row-xquery-argument________ǀ___ǀ >__________________________________________________________________________>
ǀ <__ ,_____________________________________ ǀ
ǀ_COLUMNS_____xml-table-regular-column-definition_____ǀ_)_ǀ
ǀ_xml-table-ordinality-column-definition_ǀ
Row-xquery-argument:
>_xquery-context-item-expression_________________________________________>
ǀ_xquery-variable-expression_AS_identifier_ǀ
Xml-table-regular-column-definition:
>_column-name_data-type__________________________________________________>
ǀ_default-clause_________________________ǀ
ǀ_PATH_column-xquery-expression-constant_ǀ
Xml-table-ordinality-column-definition:
>_column-name_FOR ORDINALITY_____________________________________________>
Row Functions
UNPACK
>_UNPACK(expression)_____________________________________________________>
Disclaimer: This Db2® 12 for z/OS Reference Guide was developed to help users in their daily activities in administrating and programming in Db2 for z/OS. There are no guarantees expressed or implied with the contents in this guide. We want to provide a quality and useful reference for users. Please notify us of any mistakes or errors in this reference guide at blogs@bmc.com. Db2 is a registered trademark of the IBM Corporation.
Db2 Guide
- Db2 12 for z/OS: An Introduction
- Scalar Functions in Db2 12
- How to Read IBM<sup>®</sup> Syntax Diagrams for Db2 12
- Language Elements in Db2 12
- Aggregate Functions in Db2 12
- Table & Row Functions in Db2 12
- Queries in Db2 12
- Commands in Db2 12
- SQL Control Statements in Db2 12
- Explain Tables in Db2 12
- DSNZPARMs in Db2 12
- Bind Parameters in Db2 12
- Db2 Limits in Db2 12
- SQL Communication Area (SQLCA) in Db2 12
- REXX SQLCA in Db2 12
- Get Diagnostics in Db2 12
- IFCIDS in Db2 12
- Catalog Tables in Db2 12
- Exceptions in Db2 12
- XML Schema Repository Tables in Db2 12
- Updatable Catalog Statistics in Db2 12
- IBM Utilities in Db2 12
- SQL Positive Return Codes in Db2 12
- SQL Error Return Codes in Db2 12
These postings are my own and do not necessarily represent BMC's position, strategies, or opinion.