簡體   English   中英

刪除時出現Oracle 10g XE錯誤-ORA-00903:無效的表名

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

當我在Oracle Web控制台中發出以下select語句時,它將返回表中的所有行:

select * from sbus;

但是,當我發出此刪除語句時,我收到一條錯誤消息-ORA-00903:無效的表名

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))
);

無效的表名錯誤是什么! 為何記錄未刪除!

如果您要完成的工作是清空表,則命令類似於:

truncate sbus;

如果您要刪除一些行:

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

您查詢中的*是問題所在。

它應該是:

DELETE FROM sbus;

(沒有星號“ *”)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM