我尝试使用另一个start.sql文件启动cr_tb.sql文件并收到错误奇怪的是,当我简单地将cr_tb.sql内容复制粘贴到 SQL*Plus 中时,它可以完美执行。unknown command beginning pid number...
我究竟做错了什么?(我已经发布了保管箱链接)
我尝试使用另一个start.sql文件启动cr_tb.sql文件并收到错误奇怪的是,当我简单地将cr_tb.sql内容复制粘贴到 SQL*Plus 中时,它可以完美执行。unknown command beginning pid number...
我究竟做错了什么?(我已经发布了保管箱链接)
问题的根源在于create table frclubs
声明。里面有空行
表定义:
create table frclubs
(
-- here they are
pid number(2) not null,
clubid number(2) not null,
constraint cPIDCLUBIDPK primary key(pid,clubid),
constraint fPIDFK foreign key(pid) references friends(pid),
constraint fCLUBIDFK foreign key(clubid) references clubs(clubid)
);
你有两个选择:
create table frclubs
删除DDL 语句中的空行;
SET SQLBLANKLINES ON
允许 SQL*PLUS 忽略脚本发出命令中的空白行。