为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
【DM版本】:DM8-20230417
【操作系统】:centos7
【CPU】:x86架构
【问题描述】*:create index if not exists 没用,我已经设置mysql兼容性(见图1)。报错见图2
create table test(id int);
-- 执行多次都不会报错。
create index IF NOT EXISTS "index_name" on SYSDBA."test"(id);
--在id列上继续床建索引,会报索引已经存在
create index IF NOT EXISTS "index_name1" on SYSDBA."test"(id);
这个列已有索引。
已解决,是因为列上已经有一个不同名字的索引导致的
报错是该列已经存在了索引