一早起来发现明明用show tables指令都还存在的table,查询时却提示doesnt exist,之后我到data目录下把相关的文件都删了,重新建该table却又显示table already exists,真是灵异事件了。
你的外键关系好像写错了吧constraint userId_FK foreigin key(userId) references user(id)
你的数据库类型是什么?Innodb 么