1??timestamp????????????????????????????????????varchar??
2??????????????????????????????
????????????2020-09-09 15:25:55.416
???????????? 
local_dtm                     
      | curr_dtm             
               | local_dtm_no_zone 
         | curr_dtm_no_zone       
    | 
------------------------            | 
------------------------            | 
------------------------           | 
------------------------            | 
2020-09-09 02:25:55.416  | 2020-09-08 18:25:55.416 
| 2020-09-09 02:25:55.416 | 2020-09-08 18:25:55.416 |






------------------ ???????? ------------------
??????:                                                                         
                                               "xuzh"                           
                                                         
<huazhe...@foxmail.com&gt;;
????????:&nbsp;2020??9??9??(??????) ????3:06
??????:&nbsp;"user-zh"<user-zh@flink.apache.org&gt;;

????:&nbsp;localtimestamp??current_timestamp????mysql????????



Dear all??


&nbsp;????
&gt; CREATE TABLE sink (
&gt;&nbsp; &nbsp;id INT,
&gt;&nbsp; &nbsp;prod_nm STRING,
&gt;&nbsp; dtm timestamp,
&gt;&nbsp; primary key(id)&nbsp; NOT ENFORCED --&nbsp; '??????????????'
&gt; ) 
&gt; WITH (
&gt;&nbsp; &nbsp; &nbsp;'connector' = 'jdbc',
&gt;&nbsp; &nbsp; &nbsp;'url' = 
'jdbc:mysql://10.0.0.0:3306/rs_report?useUnicode=true&amp;characterEncoding=UTF-8',
&gt;&nbsp; &nbsp; &nbsp;'table-name' = 'sink',
&gt;&nbsp; &nbsp; &nbsp;'driver' = 'com.mysql.jdbc.Driver',
&gt;&nbsp; &nbsp; &nbsp;'username' = 'dps',
&gt;&nbsp; &nbsp; &nbsp;'password' = 'dps'
&gt; );

insert into sink
&nbsp;select id,prod_nm,current_timestamp from product;



????????mysql ??dtm???????????? 
??????????????????????8??????????????????????????21????
&nbsp;
insert into sink
&nbsp;select id,prod_nm,localtimestamp from product;



????????mysql ??dtm???????????????? ??????????????????????????????????????8????.

回复