DB2

Using the Describe command of IBM DB2 to get column data types

Ever find yourself working in an unfamiliar Database or table and in need of knowing what are the data types for the different columns? Well that recently happened to me when I had to expand some queries in a DB2 environment. As it turns out there exists the Describe command that outputs the columns of

// DB2 // How To //
Read More

Subtle but required syntax when writing a DB2 WHERE clause

While continuing my exploration into the world of DB2 databases, I found myself confused as to why my basic SELECT … WHERE … statement were failing when I tried to do AND/OR clauses. After a little fumbling around I found the solution… parentheses. Parenthesis? you ask, yes. Simply put when you want to write a

// DB2 //
Read More

How to limit rows returned in a DB2 database

Back from an extended vacation and I find myself in the middle of a project needing to export data from a DB2 database. Fortunately I have decent knowledge of SQL and the basic syntax matches up but then I found myself wanting to limit the results returned. Now in T-SQL and MySQL I often would

// DB2 //
Read More