如何使列数据类型为DATE
,如YYYY-MM-DD;
当我创建一个数据类型为DATE的表时,它将变为TIMESTAMP(0)
当我ALTER SET DATA TYPE DATE
时,它仍然是TIMESTAMP(0)
和SELECT CHAR(CURRENT DATE, ISO) FROM SYSIBM.SYSDUMMY1;
SQLCODE = -171是错误,CURRENT DATE是2017-02-28 19:19:09.0
它太长了。
数据库信息:DB2 linux x64 10.5
CREATE TABLE "XCRSUSR"."TIMP_TASK_SERIAL" (
"SERIAL_NO" DECIMAL(16 , 0),
"TASK_NAME" VARCHAR(10),
"TASK_TYPE" DOUBLE,
"TASK_XML" CLOB(10) INLINE LENGTH 164,
"SEND_TIME" DATE,
"FINISH_TIME" DATE,
"TASK_STATUS" DOUBLE DEFAULT 0,
"RUN_TYPE" DOUBLE,
"FLAG" DOUBLE,
"TASK_ID" VARCHAR(10)
)
ORGANIZE BY ROW
DATA CAPTURE NONE
IN "CREDIT_U_16" INDEX IN "CREDIT_INDEX_16"
COMPRESS NO;
ALTER TABLE TIMP_TASK_SERIAL ALTER COLUMN SEND_TIME SET DATA TYPE DATE;
select CURRENT DATE from SYSIBM.SYSDUMMY1;
1
---------------------
2017-02-28 19:19:09.0
答案 0 :(得分:0)
查看
的设置下的Oracle_Compatibility
向量
表1中的位置7是您要找的wjat。