👁 0
Q: What is UDF (User Defined Function)?
Answer:
UDF extends SQL with custom functions. CREATE FUNCTION name(params) RETURNS type AS BEGIN logic END. Scalar returns single value. Table function returns rows. Use in SELECT, WHERE like built-in functions.
👁 0
Q: What is temporal table?
Answer:
Temporal tables track historical data. SYSTEM_TIME versioning automatic. APPLICATION_TIME for business time. Query AS OF for point-in-time. History table stores old versions. Built-in time travel.
👁 0
Q: How to monitor DB2 performance?
Answer:
Use OMEGAMON, DB2PM, or built-in monitor. Check: buffer pool hit ratios, lock waits, CPU time, elapsed time. DISPLAY commands show real-time. Statistics trace for analysis. EXPLAIN for query level.
👁 0
Q: How to use intrinsic functions?
Answer:
COBOL-85 intrinsic functions: FUNCTION LENGTH(field), FUNCTION CURRENT-DATE, FUNCTION UPPER-CASE(field), FUNCTION NUMVAL(field), FUNCTION MOD(a,b), FUNCTION INTEGER-OF-DATE(date). Use in expressions or with COMPUTE. Return values only, no side effects.