sqldb2db2-luw

Create table in DB2 throws BOOLEAN data type is not supported error. Any idea how to resolve this?


CREATE TABLE AR.Sample_tableM
(
   spring_profiles_active   VARCHAR (100),
   isActive                 BOOLEAN
);
 Lookup Error - DB2 Database Error: ERROR [428H2] [IBM][DB2/LINUXX8664]
 SQL20441N  A "BOOLEAN" data type is not supported in the context where
 it is being used.

Solution

  • The BOOLEAN datatype for a column is supported in Db2-LUW since Version 11.1.

    Earlier/older Db2-LUW versions did not support this column-datatype, so that may explain your SQL20441N symptom.

    Earlier versions supported BOOLEAN for other purposes including parameter-passing, but it was not a column datatype as it is with today's versions.