Sample Header Ad - 728x90

DDL for PostgreSQL for DB2 tables (migration)

0 votes
1 answer
261 views
How would I create the DDL for PostgreSQL for the following DB2 tables? It should be a one-to-one migration, so I would like to change only as little as possible at the schema (I have difficulties with the BLOB/CLOB datatypes and the default values). CREATE TABLE table1 ( field_1 DECIMAL(15) NOT NULL, field_2 ROWID NOT NULL WITH DEFAULT, field_3 DECIMAL(15) NOT NULL WITH DEFAULT, field_4 BLOB NOT NULL WITH DEFAULT, field_5 TIMESTAMP NOT NULL WITH DEFAULT, field_6 INTEGER NOT NULL WITH DEFAULT, field_7 VARCHAR(64) NOT NULL WITH DEFAULT, field_8 SMALLINT NOT NULL WITH DEFAULT, field_9 CHAR(60) NOT NULL WITH DEFAULT, field_10 DATE NOT NULL WITH DEFAULT, field_11 DECIMAL(12,3) NOT NULL WITH DEFAULT, field_12 TIME NOT NULL WITH DEFAULT, field_13 BIGINT NOT NULL WITH DEFAULT ); Second table: CREATE TABLE table2 ( field_1 DECIMAL(15) NOT NULL, field_2 ROWID NOT NULL, field_3 VARCHAR(2500) NOT NULL, field_4 CLOB );
Asked by user3193317 (149 rep)
Jul 18, 2018, 08:35 AM
Last activity: Jul 18, 2018, 08:57 AM