Oracle 10g XE 删除时出错 - ORA-00903:无效的表名
当我在 Oracle Web 控制台中发出此 select 语句时,它会返回表中的所有行:
select * from sbus;
我收到一条错误消息 - ORA-00903: invalid table name
delete * from sbus;
此表非常简单:
create table sbus
( id number(11) not null,
sbu varchar2(75 char) not null,
sbu_name varchar2(250 char) not null,
constraint sbus_pk primary key (id)
using index (create index sbus_px on sbus (id))
);
但是,当我发出此删除语句时, 无效表名错误!还有为什么记录没有被删除!
When I issue this select statement in the Oracle web console it returns all the rows in the table:
select * from sbus;
However when I issue this delete statement I receive an error message - ORA-00903: invalid table name
delete * from sbus;
This table is very simple:
create table sbus
( id number(11) not null,
sbu varchar2(75 char) not null,
sbu_name varchar2(250 char) not null,
constraint sbus_pk primary key (id)
using index (create index sbus_px on sbus (id))
);
What is with the invalid table name error! And why are the records not deleted!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想要完成的是清空表,则命令类似于:
如果您尝试删除某些行:
查询中的 * 就是问题所在。
if what you are trying to accomplish is to empty the table the command is something like:
if you are trying to delete some rows:
the * in your query is the problem.
应该是:(
不带星号“*”)
It should be:
(without star "*")