开发者

Oracle 10g XE error on delete - ORA-00903: invalid table name

开发者 https://www.devze.com 2023-02-12 06:39 出处:网络
When I issue this select statement in the Oracle web console it returns all the rows 开发者_运维知识库in the table:

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!


if what you are trying to accomplish is to empty the table the command is something like:

truncate sbus;

if you are trying to delete some rows:

delete from sbus where .....//put your condition

the * in your query is the problem.


It should be:

DELETE FROM sbus;

(without star "*")

0

精彩评论

暂无评论...
验证码 换一张
取 消