你好,mysql兼容模式。这个问题可以帮忙看看吗?
CREATE DATABASE dolphindb2 DBCOMPATIBILITY 'B' encoding 'UTF-8' LC_COLLATE 'zh_CN.utf8' LC_CTYPE 'zh_CN.utf8'; \c dolphindb2 set dolphin.b_compatibility_mode = on; -- ALTER schema information_schema CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE mydatabase1 CHARACTER SET utf8 COLLATE utf8_general_ci; set search_path to mydatabase1; create table T1(a int,B varchar(100)); insert into t1 values(1,'aaaa'); -- 值是可以大小写忽略匹配 select * from t1 where b = 'AAAA'; select * from information_schema.columns where table_name='t1'; -- 这个视图的,还是没办法去匹配(mysql支持) select * from information_schema.columns where table_name='T1'; -- 这个视图的,还是没办法去匹配(mysql支持)
SELECT table_name, column_name, character_set_name FROM information_schema.columns WHERE table_name = 't1';
SELECT table_name, column_name, character_set_name FROM information_schema.columns WHERE table_name = 'T1';
| | keep | | keep__go@163.com |
ALTER schema 修改默认字符序只作用于在schema下新创建的对象。 information_schema.columns是已经存在的对象,alter schema不会改变已存在对象的字符序。 目前可以通过对表达式指定collate的方式处理: select * from information_schema.columns where table_name='T1' collate utf8_general_ci;
-----邮件原件----- 发件人: keep keep__go@163.com 发送时间: 2023年8月11日 9:20 收件人: sqlengine@opengauss.org 主题: [SQLEngine] mysql兼容模式问题
你好,mysql兼容模式。这个问题可以帮忙看看吗?
CREATE DATABASE dolphindb2 DBCOMPATIBILITY 'B' encoding 'UTF-8' LC_COLLATE 'zh_CN.utf8' LC_CTYPE 'zh_CN.utf8'; \c dolphindb2 set dolphin.b_compatibility_mode = on; -- ALTER schema information_schema CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE mydatabase1 CHARACTER SET utf8 COLLATE utf8_general_ci; set search_path to mydatabase1; create table T1(a int,B varchar(100)); insert into t1 values(1,'aaaa'); -- 值是可以大小写忽略匹配 select * from t1 where b = 'AAAA'; select * from information_schema.columns where table_name='t1'; -- 这个视图的,还是没办法去匹配(mysql支持) select * from information_schema.columns where table_name='T1'; -- 这个视图的,还是没办法去匹配(mysql支持)
SELECT table_name, column_name, character_set_name FROM information_schema.columns WHERE table_name = 't1';
SELECT table_name, column_name, character_set_name FROM information_schema.columns WHERE table_name = 'T1';
| | keep | | keep__go@163.com | _______________________________________________ SQLEngine mailing list -- sqlengine@opengauss.org To unsubscribe send an email to sqlengine-leave@opengauss.org