云数据库 GAUSSDB-CREATE CAST:语法格式

时间:2024-11-02 18:50:33

语法格式

  • 定义通过函数转换的CAST:
    CREATE CAST (source_type AS target_type)
        WITH FUNCTION function_name (argument_type [, ...])
        [ AS ASSIGNMENT | AS IMPLICIT ];
  • 定义不通过函数转换的CAST:
    CREATE CAST (source_type AS target_type)
        WITHOUT FUNCTION
        [ AS ASSIGNMENT | AS IMPLICIT ];
  • 定义通过I/O转换的CAST:
    CREATE CAST (source_type AS target_type)
        WITH INOUT
        [ AS ASSIGNMENT | AS IMPLICIT ];
support.huaweicloud.com/centralized-devg-v3-gaussdb/gaussdb-12-0511.html