SHOW VARIABLES LIKE "%version%"
;
/*
Variable_name Value
innodb_version 5.7.20
protocol_version 10
slave_type_conversions
version 10.2.10-MariaDB
version_comment mariadb.org binary distribution
version_compile_machine x64
version_compile_os Win64
version_malloc_library system
version_ssl_library YaSSL 2.4.4
*/
CREATE OR REPLACE TABLE testT
(
tid INT
, aDT DATETIME
)
;
-- ISO8601형식의 문자열이 DATETIME으로 잘 바뀐거 같은데
SELECT 1, CAST( '2017-11-09T12:34:56+0900' AS DATETIME )
;
-- error: SQL 오류 (1292): Truncated incorrect datetime value: '2017-11-09T12:34:56+0900' 라고 오류가 나는 이유가 뭘까요?
INSERT INTO testT( tid, aDT )
SELECT 1, CAST( '2017-11-09T12:34:56+0900' AS DATETIME )
;
|