Generate test data to help debug DB2 SQL

You can easily create test data to help debug SQL statements:

with data (key, value) as
(   values ('key1', 'a')
         , ('key2', null)
         , ('key3', 'z')
select 'min', min(coalesce(value,'')) from data
select 'max', max(coalesce(value,'')) from data
Like this? Consider joining my mailing list, or at least using my affiliate link when buying from Amazon 🙂

You or someone you know looking to buy or sell?

Leave a Reply