关于忽略判断(长度/有效位/小数位):
-1:未设置; 0:不忽略; 1:忽略; 2:根据情况(未提供则忽略); 3:用来处理precision和scale相互依赖的情况,只有同时有值才生效,其中一个没值就全忽略

公式中的变量:
L:长度;P:有效位;S:小数位
数据库兼容及转换
序号 StandardTypeMetadata枚举名 数据类型 SQL公式 大类 小类 忽略长度 忽略有效位 忽略小数位
1 ACLITEM ACLITEM ACLITEM NONE NONE 1 1 1
2 AGG_STATE AGG_STATE AGG_STATE NONE NONE 1 1 1
3 ARRAY Array Array NONE NONE 2 2 2
4 BFILE BFILE BFILE BYTES BYTES 1 1 1
5 BIGINT BIGINT BIGINT NUMBER INT 1 1 1
6 BIGSERIAL BIGSERIAL BIGSERIAL NUMBER INT 1 1 1
7 BINARY BINARY BINARY BYTES BYTES 0 1 1
8 BINARY_DOUBLE BINARY_DOUBLE BINARY_DOUBLE NUMBER FLOAT 1 0 0
9 BINARY_FLOAT BINARY_FLOAT BINARY_FLOAT NUMBER FLOAT 1 0 0
10 BINARY_INTEGER BINARY_INTEGER BINARY_INTEGER NONE NONE 1 1 1
11 BIT BIT BIT BOOLEAN BOOLEAN 1 1 1
12 BITMAP BITMAP BITMAP BYTES BYTES 1 1 1
13 BIT_VARYING BIT VARYING BIT VARYING NONE NONE 1 1 1
14 BLOB BLOB BLOB BYTES BLOB 1 1 1
15 BOOL Bool Bool BOOLEAN BOOLEAN 1 1 1
16 BOOLEAN BOOLEAN BOOLEAN BOOLEAN BOOLEAN 1 1 1
17 BOX BOX BOX GEOMETRY GEOMETRY 1 1 1
18 BPCHAR BPCHAR BPCHAR NONE NONE 1 1 1
19 BPCHARBYTE BPCHARBYTE BPCHARBYTE NONE NONE 1 1 1
20 BYTE BYTE BYTE NUMBER INT 1 1 1
21 BYTEA BYTEA BYTEA BYTES BYTES 1 1 1
22 CHAR CHAR CHAR STRING CHAR 0 1 1
23 CHARACTER CHARACTER CHARACTER NONE NONE 1 1 1
24 CID CID CID NONE NONE 1 1 1
25 CIDR CIDR CIDR GEOMETRY GEOMETRY 1 1 1
26 CIRCLE CIRCLE CIRCLE GEOMETRY GEOMETRY 1 1 1
27 CLICKHOUSE_DATE32 Date32 Date32 DATETIME DATE 1 1 1
28 CLICKHOUSE_DATETIME64 DateTime DateTime DATETIME DATE 1 1 1
29 CLICKHOUSE_DECIMAL128 Decimal128 Decimal128 NUMBER FLOAT 1 0 2
30 CLICKHOUSE_DECIMAL256 Decimal256 Decimal256 NUMBER FLOAT 1 0 2
31 CLICKHOUSE_DECIMAL32 Decimal32 Decimal32 NUMBER FLOAT 1 0 2
32 CLICKHOUSE_DECIMAL64 Decimal64 Decimal64 NUMBER FLOAT 1 0 2
33 CLICKHOUSE_FLOAT32 Float32 Float32 NUMBER FLOAT 1 1 1
34 CLICKHOUSE_FLOAT64 Float64 Float64 NUMBER FLOAT 1 1 1
35 CLICKHOUSE_INT128 Int128 Int128 NUMBER INT 1 1 1
36 CLICKHOUSE_INT16 Int16 Int16 NUMBER INT 1 1 1
37 CLICKHOUSE_INT256 Int256 Int256 NUMBER INT 1 1 1
38 CLICKHOUSE_INT32 Int32 Int32 NUMBER INT 1 1 1
39 CLICKHOUSE_INT64 Int64 Int64 NUMBER INT 1 1 1
40 CLICKHOUSE_INT8 Int8 Int8 NUMBER INT 1 1 1
41 CLICKHOUSE_UINT128 UInt128 UInt128 NUMBER INT 1 1 1
42 CLICKHOUSE_UINT16 UInt16 UInt16 NUMBER INT 1 1 1
43 CLICKHOUSE_UINT256 UInt256 UInt256 NUMBER INT 1 1 1
44 CLICKHOUSE_UINT32 UInt32 UInt32 NUMBER INT 1 1 1
45 CLICKHOUSE_UINT64 UInt64 UInt64 NUMBER INT 1 1 1
46 CLICKHOUSE_UINT8 UInt8 UInt8 NUMBER INT 1 1 1
47 CLOB CLOB CLOB STRING TEXT 1 1 1
48 CURSOR CURSOR CURSOR NONE NONE 1 1 1
49 DATE Date Date DATETIME DATE 1 1 1
50 DATERANGE DATERANGE DATERANGE NONE NONE 1 1 1
51 DATETIME DateTime DateTime DATETIME DATETIME 1 1 1
52 DATETIME2 DATETIME2 DATETIME2 DATETIME DATETIME 1 1 1
53 DATETIMEOFFSET DATETIMEOFFSET DATETIMEOFFSET DATETIME DATETIME 1 1 1
54 DECFLOAT DECFLOAT DECFLOAT NUMBER FLOAT 1 2 1
55 DECIMAL Decimal Decimal NUMBER FLOAT 1 0 0
56 DOUBLE DOUBLE DOUBLE NUMBER FLOAT 1 0 0
57 DOUBLE_PRECISION DOUBLE PRECISION DOUBLE PRECISION NUMBER FLOAT 1 1 1
58 DSINTERVAL DSINTERVAL DSINTERVAL NONE NONE 1 1 1
59 ENUM ENUM ENUM NONE NONE 1 1 1
60 FixedString FixedString FixedString STRING TEXT 0 1 1
61 FLOAT FLOAT FLOAT NUMBER FLOAT 1 2 3
62 FLOAT4 FLOAT4 FLOAT4 NUMBER FLOAT 1 2 1
63 FLOAT8 FLOAT8 FLOAT8 NUMBER FLOAT 1 2 1
64 GEOGRAPHY GEOGRAPHY GEOGRAPHY GEOMETRY GEOMETRY 1 1 1
65 GEOGRAPHY_POINT GEOGRAPHY_POINT GEOGRAPHY_POINT GEOMETRY GEOMETRY 1 1 1
66 GEOMETRY GEOMETRY GEOMETRY GEOMETRY GEOMETRY 1 1 1
67 GEOMETRYCOLLECTION GEOMETRYCOLLECTION GEOMETRYCOLLECTION GEOMETRY GEOMETRY 1 1 1
68 GTSVECTOR GTSVECTOR GTSVECTOR NONE NONE 1 1 1
69 GUID GUID GUID NONE NONE 1 1 1
70 HIERARCHYID HIERARCHYID HIERARCHYID GEOMETRY GEOMETRY 1 1 1
71 HLL HLL HLL STRING TEXT 0 1 1
72 IMAGE IMAGE IMAGE BYTES BYTES 1 1 1
73 INET INET INET GEOMETRY GEOMETRY 1 1 1
74 INT int int NUMBER INT 1 1 1
75 INT128 Int128 Int128 NUMBER INT 1 1 1
76 INT2 INT2 INT2 NUMBER INT 1 1 1
77 INT256 Int256 Int256 NUMBER INT 1 1 1
78 INT32 Int32 Int32 NUMBER INT 1 1 1
79 INT4 INT4 INT4 NUMBER INT 1 1 1
80 INT4RANGE INT4RANGE INT4RANGE NONE NONE 1 1 1
81 INT64 Int64 Int64 NUMBER INT 1 1 1
82 INT8 INT8 INT8 NUMBER INT 1 1 1
83 INT8RANGE INT8RANGE INT8RANGE NONE NONE 1 1 1
84 INTEGER INTEGER INTEGER NUMBER INT 1 1 1
85 INTERVAL INTERVAL INTERVAL NONE NONE 1 1 1
86 INTERVAL_DAY INTERVAL DAY INTERVAL DAY NONE NONE 1 2 2
87 INTERVAL_DAY_HOUR INTERVAL DAY TO HOUR INTERVAL DAY({P}) TO HOUR({S}) NONE NONE 1 2 2
88 INTERVAL_DAY_MINUTE INTERVAL DAY TO MINUTE INTERVAL DAY({P}) TO MINUTE({S}) NONE NONE 1 2 2
89 INTERVAL_DAY_SECOND INTERVAL DAY TO SECOND INTERVAL DAY({P}) TO SECOND({S}) NONE NONE 1 2 2
90 INTERVAL_HOUR INTERVAL HOUR INTERVAL HOUR({P}) NONE NONE 1 2 1
91 INTERVAL_HOUR_MINUTE INTERVAL HOUR TO MINUTE INTERVAL HOUR({P}) TO MINUTE({S}) NONE NONE 1 2 2
92 INTERVAL_HOUR_SECOND INTERVAL HOUR TO SECOND INTERVAL HOUR({P}) TO SECOND({S}) NONE NONE 1 2 2
93 INTERVAL_MINUTE INTERVAL MINUTE INTERVAL MINUTE({P}) NONE NONE 1 2 1
94 INTERVAL_MINUTE_SECOND INTERVAL MINUTE TO SECOND INTERVAL MINUTE({P}) TO SECOND({S}) NONE NONE 1 2 2
95 INTERVAL_MONTH INTERVAL MONTH INTERVAL MONTH({P}) NONE NONE 1 2 1
96 INTERVAL_SECOND INTERVAL SECOND INTERVAL SECOND({P}) NONE NONE 1 2 1
97 INTERVAL_YEAR INTERVAL YEAR INTERVAL YEAR({P}) NONE NONE 1 2 1
98 INTERVAL_YEAR_MONTH INTERVAL YEAR TO MONTH INTERVAL YEAR({P}) TO MONTH({S}) NONE NONE 1 2 2
99 IPV4 IPV4 IPV4 NONE NONE 1 1 1
100 IPV6 IPV6 IPV6 NONE NONE 1 1 1
101 JAVA_OBJECT JAVA_OBJECT JAVA_OBJECT NONE NONE 1 1 1
102 JSON JSON JSON STRING TEXT 1 1 1
103 JSONB JSONB JSONB BYTES BYTES 1 1 1
104 JSONPATH JSONPATH JSONPATH NONE NONE 1 1 1
105 LARGEINT LARGEINT LARGEINT NUMBER INT 1 1 1
106 LINE LINE LINE GEOMETRY GEOMETRY 1 1 1
107 LINESTRING LINESTRING LINESTRING GEOMETRY GEOMETRY 1 1 1
108 LIST LIST LIST NONE NONE 1 1 1
109 LONGBLOB LONGBLOB LONGBLOB BYTES BYTES 1 1 1
110 LONGTEXT LONGTEXT LONGTEXT STRING TEXT 1 1 1
111 LONG_TEXT LONG LONG STRING TEXT 1 1 1
112 LowCardinality LowCardinality LowCardinality NONE NONE 1 1 1
113 LSEG LSEG LSEG GEOMETRY GEOMETRY 1 1 1
114 LVARCHAR LVARCHAR LVARCHAR STRING CHAR 0 1 1
115 MACADDR MACADDR MACADDR NONE NONE 1 1 1
116 MACADDR8 MACADDR8 MACADDR8 NONE NONE 1 1 1
117 MAP MAP MAP NONE NONE 1 1 1
118 MEDIUMBLOB MEDIUMBLOB MEDIUMBLOB BYTES BYTES 1 1 1
119 MEDIUMINT MEDIUMINT MEDIUMINT NUMBER INT 1 1 1
120 MEDIUMTEXT MEDIUMTEXT MEDIUMTEXT STRING TEXT 1 1 1
121 MONEY MONEY MONEY NUMBER FLOAT 1 1 1
122 MULTILINESTRING MULTILINESTRING MULTILINESTRING BYTES BYTES 1 1 1
123 MULTIPOINT MULTIPOINT MULTIPOINT GEOMETRY GEOMETRY 1 1 1
124 MULTIPOLYGON MULTIPOLYGON MULTIPOLYGON GEOMETRY GEOMETRY 1 1 1
125 MULTISET MULTISET MULTISET NONE NONE 1 1 1
126 NATURALN NATURALN NATURALN NONE NONE 1 1 1
127 NCHAR NCHAR NCHAR STRING CHAR 0 1 1
128 NCLOB NCLOB NCLOB STRING TEXT 1 1 1
129 NTEXT NTEXT NTEXT STRING TEXT 1 1 1
130 NUMBER NUMBER NUMBER NUMBER FLOAT 1 2 2
131 NUMERIC NUMERIC NUMERIC NUMBER FLOAT 1 0 0
132 NUMRANGE NUMRANGE NUMRANGE NONE NONE 1 1 1
133 NVARCHAR NVARCHAR NVARCHAR STRING CHAR 0 1 1
134 NVARCHAR2 NVARCHAR2 NVARCHAR2 STRING CHAR 0 1 1
135 OBJECT OBJECT OBJECT NONE NONE 1 1 1
136 OID OID OID NONE NONE 1 1 1
137 ORA_DATE ORA_DATE ORA_DATE NONE NONE 1 1 1
138 PATH PATH PATH GEOMETRY GEOMETRY 1 1 1
139 PG_SNAPSHOT PG_SNAPSHOT PG_SNAPSHOT NONE NONE 1 1 1
140 POINT POINT POINT GEOMETRY GEOMETRY 1 1 1
141 POLYGON POLYGON POLYGON GEOMETRY GEOMETRY 1 1 1
142 POSITIVE POSITIVE POSITIVE NONE NONE 1 1 1
143 POSITIVEN POSITIVEN POSITIVEN NONE NONE 1 1 1
144 RAW RAW RAW NONE NONE 1 1 1
145 REAL REAL REAL NUMBER FLOAT 1 0 0
146 REFCURSOR REFCURSOR REFCURSOR NONE NONE 1 1 1
147 REGCLASS REGCLASS REGCLASS NONE NONE 1 1 1
148 REGCONFIG REGCONFIG REGCONFIG NONE NONE 1 1 1
149 REGDICTIONARY REGDICTIONARY REGDICTIONARY NONE NONE 1 1 1
150 REGNAMESPACE REGNAMESPACE REGNAMESPACE NONE NONE 1 1 1
151 REGOPER REGOPER REGOPER NONE NONE 1 1 1
152 REGOPERATOR REGOPERATOR REGOPERATOR NONE NONE 1 1 1
153 REGPROC REGPROC REGPROC NONE NONE 1 1 1
154 REGPROCEDURE REGPROCEDURE REGPROCEDURE NONE NONE 1 1 1
155 REGROLE REGROLE REGROLE NONE NONE 1 1 1
156 REGTYPE REGTYPE REGTYPE NONE NONE 1 1 1
157 RING RING RING GEOMETRY GEOMETRY 1 1 1
158 ROW ROW ROW NONE NONE 1 1 1
159 ROWID ROWID ROWID NONE NONE 1 1 1
160 SECONDDATE SECONDDATE SECONDDATE DATETIME DATE 1 1 1
161 SERIAL SERIAL SERIAL NUMBER INT 1 1 1
162 SERIAL2 SERIAL2 SERIAL2 NUMBER INT 1 1 1
163 SERIAL4 SERIAL4 SERIAL4 NUMBER INT 1 1 1
164 SERIAL8 SERIAL8 SERIAL8 NUMBER INT 1 1 1
165 SET SET SET NONE NONE 1 1 1
166 SHORT SHORT SHORT NUMBER INT 1 1 1
167 SIGNTYPE SIGNTYPE SIGNTYPE NONE NONE 1 1 1
168 SimpleAggregateFunction SimpleAggregateFunction SimpleAggregateFunction NONE NONE 1 1 1
169 SIMPLE_DOUBLE SIMPLE_DOUBLE SIMPLE_DOUBLE NONE NONE 1 1 1
170 SIMPLE_FLOAT SIMPLE_FLOAT SIMPLE_FLOAT NONE NONE 1 1 1
171 SIMPLE_INTEGER SIMPLE_INTEGER SIMPLE_INTEGER NONE NONE 1 1 1
172 SMALLDATETIME SMALLDATETIME SMALLDATETIME DATETIME DATETIME 1 1 1
173 SMALLDECIMAL SMALLDECIMAL SMALLDECIMAL NUMBER FLOAT 1 0 0
174 SMALLFLOAT SMALLFLOAT SMALLFLOAT NUMBER FLOAT 1 0 1
175 SMALLINT SMALLINT SMALLINT NUMBER INT 1 1 1
176 SMALLMONEY SMALLMONEY SMALLMONEY NUMBER FLOAT 1 1 1
177 SMALLSERIAL SMALLSERIAL SMALLSERIAL NUMBER INT 1 1 1
178 SQL_DATETIMEOFFSET SQL_DATETIMEOFFSET SQL_DATETIMEOFFSET DATETIME DATETIME 1 1 1
179 SQL_VARIANT SQL_VARIANT SQL_VARIANT NONE NONE 1 1 1
180 STRING STRING STRING STRING TEXT 1 1 1
181 STRUCT STRUCT STRUCT NONE NONE 1 1 1
182 ST_GEOMETRY ST_GEOMETRY ST_GEOMETRY GEOMETRY GEOMETRY 1 1 1
183 ST_POINT ST_POINT ST_POINT GEOMETRY GEOMETRY 1 1 1
184 SYSNAME SYSNAME SYSNAME STRING TEXT 1 1 1
185 SYS_REFCURSOR SYS_REFCURSOR SYS_REFCURSOR NONE NONE 1 1 1
186 TEXT TEXT TEXT STRING TEXT 1 1 1
187 TID TID TID NONE NONE 1 1 1
188 TIME TIME TIME DATETIME TIME 1 1 1
189 TIMESTAMP TIMESTAMP TIMESTAMP DATETIME TIMESTAMP 1 2 1
190 TIMESTAMPTZ TIMESTAMPTZ TIMESTAMPTZ DATETIME TIMESTAMP 1 2 1
191 TIMESTAMP_WITHOUT_TIME_ZONE TIMESTAMP WITHOUT TIME ZONE TIMESTAMP WITHOUT TIME ZONE NONE NONE 1 2 1
192 TIMESTAMP_WITH_LOCAL_ZONE TIMESTAMP WITH LOCAL TIME ZONE TIMESTAMP WITH LOCAL TIME ZONE DATETIME TIMESTAMP 1 2 1
193 TIMESTAMP_WITH_TIME_ZONE TIMESTAMP WITH TIME ZONE TIMESTAMP({S}) WITH TIME ZONE DATETIME TIMESTAMP 1 1 2
194 TIMEZ TIMEZ TIMEZ DATETIME TIME 1 1 1
195 TIME_TZ_UNCONSTRAINED TIME TZ UNCONSTRAINED TIME TZ UNCONSTRAINED NONE NONE 1 1 1
196 TIME_UNCONSTRAINED TIME_UNCONSTRAINED TIME_UNCONSTRAINED NONE NONE 1 1 1
197 TIME_WITHOUT_TIME_ZONE TIME WITHOUT TIME ZONE TIME WITHOUT TIME ZONE NONE NONE 1 1 1
198 TIME_WITH_TIME_ZONE TIME WITH TIME ZONE TIME WITH TIME ZONE DATETIME TIME 1 1 1
199 TINYBLOB TINYBLOB TINYBLOB BYTES BYTES 1 1 1
200 TINYINT TINYINT TINYINT NUMBER INT 1 1 1
201 TINYTEXT TINYTEXT TINYTEXT STRING TEXT 1 1 1
202 TSQUERY TSQUERY TSQUERY NONE NONE 1 1 1
203 TSRANGE TSRANGE TSRANGE NONE NONE 1 1 1
204 TSTZRANGE TSTZRANGE TSTZRANGE NONE NONE 1 1 1
205 TSVECTOR TSVECTOR TSVECTOR NONE NONE 1 1 1
206 TUPLE TUPLE TUPLE NONE NONE 1 1 1
207 TXID_SNAPSHOT TXID_SNAPSHOT TXID_SNAPSHOT NONE NONE 1 1 1
208 UNIQUEIDENTIFIER UNIQUEIDENTIFIER UNIQUEIDENTIFIER STRING TEXT 1 1 1
209 UROWID UROWID UROWID NONE NONE 1 1 1
210 UUID UUID UUID STRING TEXT 1 1 1
211 VARBINARY VARBINARY VARBINARY BYTES BYTES 0 1 1
212 VARBIT VARBIT VARBIT BOOLEAN BOOLEAN 1 1 1
213 VARCHAR VARCHAR VARCHAR STRING CHAR 0 1 1
214 VARCHAR2 VARCHAR2 VARCHAR2 STRING CHAR 0 1 1
215 VARCHARBYTE VARCHARBYTE VARCHARBYTE NONE NONE 1 1 1
216 XID XID XID NONE NONE 1 1 1
217 XML XML XML STRING TEXT 1 1 1
218 YEAR YEAR YEAR DATETIME DATE 1 1 1
219 YMINTERVAL YMINTERVAL YMINTERVAL NONE NONE 1 1 1
220 STRUCTS STRUCTS STRUCTS NONE NONE
221 DURATION DURATION DURATION NONE NONE 1 1 1
222 INT16 INT16 INT16 NUMBER INT 1 1 1
223 FIXED_STRING FIXED_STRING FIXED_STRING({l}) STRING TEXT 0 1 1
224 KEYWORD keyword keyword STRING TEXT
225 GEO_POINT geo_point geo_point GEOMETRY GEOMETRY
226 LONG long NUMBER INT
227 HALF_FLOAT half_float NUMBER FLOAT
228 SCALED_FLOAT scaled_float scaled_float NUMBER FLOAT
229 UNSIGNED_LONG unsigned_long NUMBER INT
230 ALIAS alias NONE NONE
231 FLATTENED flattened NONE NONE
232 NESTED nested NONE NONE
233 JOIN join NONE NONE
234 RANGE Range NONE NONE
235 IP ip NONE NONE
236 VERSION version NONE NONE
237 HISTOGRAM histogram NONE NONE
238 COMPLETION completion NONE NONE
239 TOKEN_COUNT token_count NONE NONE
240 DENSE_VECTOR dense_vector NONE NONE
241 SPARSE_VECTOR sparse_vector NONE NONE
242 RANK_FEATURE rank_feature NONE NONE
243 RANK_FEATURES rank_features NONE NONE
244 GEO_SHAPE geo_shape GEOMETRY GEOMETRY
245 SHAPE shape GEOMETRY GEOMETRY
246 PERCOLATOR percolator NONE NONE
247 TIMESTAMP_WITHOUT_ZONE TIMESTAMP WITHOUT TIME ZONE TIMESTAMP WITHOUT TIME ZONE NONE NONE 1 2 1
248 TIMESTAMP_WITH_ZONE TIMESTAMP WITH TIME ZONE TIMESTAMP({S}) WITH TIME ZONE DATETIME TIMESTAMP 1 1 2
249 TIME_WITHOUT_ZONE TIME WITHOUT TIME ZONE TIME WITHOUT TIME ZONE NONE NONE 1 1 1
250 TIME_WITH_ZONE TIME WITH TIME ZONE TIME WITH TIME ZONE DATETIME TIME 1 1 1
251 DEC DEC DEC({P},{S}) NUMBER FLOAT 1 0 0
252 DATE_NANOS date_nanos date_nanos DATETIME DATE 1 1 1
253 AGGREGATE_METRIC_DOUBLE aggregate_metric_double aggregate_metric_double NONE NONE 1 1 1
254 MATCH_ONLY_TEXT match_only_text match_only_text STRING TEXT
255 DATETIME_WITH_TIME_ZONE DATETIME WITH TIME ZONE DATETIME({S}) WITH TIME ZONE DATETIME TIME 1 1 2
256 VECTOR VECTOR VECTOR({P}) NONE NONE 1 0 1
257 TIMESTAMP_NTZ TIMESTAMP_NTZ TIMESTAMP_NTZ DATETIME TIMESTAMP
258 DATEV2 DATEV2 DATEV2 DATETIME DATETIME
259 DATETIMEV2 DATETIMEV2 DATETIMEV2 DATETIME DATETIME
260 TIMETZ TIMETZ TIMETZ DATETIME DATETIME
261 VARBYTE VARBYTE TIMETZ DATETIME DATETIME
262 BOX2D BOX2D BOX2D GEOMETRY GEOMETRY
263 XMLTYPE XMLTYPE XMLTYPE STRING TEXT
首页 最近更新 搜索 提交 回复