1.包含某个字符
Instr('全字符','字符')>0
2.if语句判断
BEGIN
IF 85 >= 90 THEN
SELECT '优秀';
ELSIF 85 >= 80 THEN
SELECT '良好';
ELSIF 85 >= 70 THEN
SELECT '中等';
ELSE
SELECT '不及格';
END IF;
END;
3.多行转列数据
SELECT Code,wm_concat(Name)
FROM 表
GROUP BY Code
3.列转行
select 字段1 ,字段2 from (
SELECT
字段1,
XMLPARSE(DOCUMENT '<root><v>' || REPLACE(字段2, ',', '</v><v>') || '</v></root>') as 字段2_XML
FROM 表 t
) bb
OUTER APPLY XMLTable('/root/v' PASSING 字段2_XML COLUMNS 字段2 VARCHAR PATH '.' ) AS x