I am trying to create DB2 MQT table in my DB2 v10.5, but I got the following error message:
An unexpected token "CREATE TABLE T_MQT AS ( SELECT ID, COL1, C" was found following "BEGIN-OF-STATEMENT". Expected tokens may include: "".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.16.53 SQL Code: -104, SQL State: 42601
Here is my create table statement:
CREATE TABLE T ( ID VARCHAR(128) NOT NULL, COL1 VARCHAR(128), COL2 VARCHAR(128), COL3 VARCHAR(128), COL4 VARCHAR(128), COL5 VARCHAR(128), PRIMARY KEY (ID) ); CREATE TABLE T_MQT AS ( SELECT ID, COL1, COL2, COL3 FROM T ) DATA INITIALLY DEFERRED REFRESH IMMEDIATE SET INTEGRITY FOR T_MQT IMMEDIATE CHECKED NOT INCREMENTAL;