输入下列代码SQL报错,请问错误在哪里:alter table 客户 add constraint FK_Reference_2 foreign key (pid) references 理财产品 (pid) on delete restrict on update restrict;
时间: 2024-03-31 22:32:31 浏览: 165
SQL 错误提示
根据输入的SQL语句,错误在于"理财产品"表名中有空格,建议将其修改为"理财产品"或使用双引号将其包含起来,如下所示:
```
alter table 客户 add constraint FK_Reference_2 foreign key (pid) references "理财产品" (pid) on delete restrict on update restrict;
```
阅读全文