繁体   English   中英

无法在sqlplus中删除表

[英]Unable to drop table in sqlplus

我一直在尝试一切,表确实存在,但是我似乎无法删除它。 该表被命名为“学生”。

DDL:

drop table student cascade constraints; 
drop table student;

错误:

ERROR at line 1: ORA-00942: table or view does not exist 

使用数据字典查找模式名称:all_tables。 并使用架构名称/所有者作为删除表的前缀。

Select owner, TABLE_NAME from all_tables where table_name = 'STUDENT' 

Drop table <owner>.<table_name>   -- replace <owner> and <table_name> with proper values. 

确保您已连接到正确的数据库。 其他可能性是学生可以使用外键。 检查其他表创建脚本,以确保没有类似以下内容的行:

studentId References student(id)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM