CREATE TABLE `mysql_example` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`name` varchar(64) DEFAULT NULL COMMENT '姓名',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`)
)
COMMENT = 'mysql例子'
ENGINE = InnoDB;insert into mysql_example values(1,'li','2024-01-01 14:06:30');
insert into mysql_example values(2,'张三','2024-01-01 14:06:30');
FlinkSQL的语句及查询出的结果如下
CREATE TABLE mysql_table (
id BIGINT,
name STRING,
create_time TIMESTAMP
) WITH (
'connector' = 'jdbc',
'url' = '