相关文章推荐
坚强的猴子  ·  PostgreSQL遍历Json_posgr ...·  2 月前    · 
傻傻的豆浆  ·  企业服务总线·  9 月前    · 
深沉的鸡蛋面  ·  monaco-editor ...·  1 年前    · 
越狱的蚂蚁  ·  Spring Batch - ...·  1 年前    · 
  • 通过类型转换函数CAST进行转换
  • postgres=# select CAST('10' as int),CAST('2021-12-05' as date);
     int4 |    date
    ------+------------
       10 | 2021-12-05
    (1 row)
    
  • 通过双冒号方式进行转换
  • postgres=# select '10'::int,'2021-12-05'::date;
     int4 |    date
    ------+------------
       10 | 2021-12-05
    (1 row)
    复制代码
    分类:
    后端
    标签: