我对 DataGrip 进行了错误检查,但是当我尝试 运行 文件时,sql 文件仍然生成语法错误

I did error check on DataGrip but the sql file was still generating a syntax error when I try to run it

所以我在 MySql 数据库上安装了一个架构。我错误地检查了 DataGrip 上的 sql 脚本,它没有显示语法错误;但是当我运行它时弹出语法错误

ERROR 1064 (42000) at line 54: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.ortholog_seq_a_ix on orthomcl.ortholog(sequence_id_a)' at line 1

原代码如下:

CREATE TABLE orthomcl.Ortholog (
SEQUENCE_ID_A           VARCHAR(15),
SEQUENCE_ID_B           VARCHAR(15),
TAXON_ID_A              VARCHAR(15),
TAXON_ID_B              VARCHAR(15),
UNNORMALIZED_SCORE      DOUBLE,
NORMALIZED_SCORE        DOUBLE    
);

CREATE INDEX orthomcl.ortholog_seq_a_ix on orthomcl.ortholog(sequence_id_a);

顺便说一句,我使用的是 ubuntu 系统。

CREATE INDEX ortholog_seq_a_ix on orthomcl.ortholog(sequence_id_a);

有用吗?如果已经在 table def

中指定,您可能不需要在索引定义中指定模式