Archive for the ‘DB2’ Category

DB2 Creating (faking) a Boolean datatype


When creating a table in DB2, to create a Boolean datatype column (since DB2 doesn’t have this natively) you have to use a check constraint on a smallint column. So if you have a column named “ACTIVE” that you want to be Boolean, you would create the that col ...

DB2 Creating Sequences to use with Primary Key ID fields


Well, another job and another database system to learn. I've got practically all of them under my belt now ;-) I finished reading this article on sequences vs key managers vs identity columns and decided I needed to go with a sequence. To create a new sequence called “USERS_SEQ” for a ...

Close
E-mail It