我在oracle数据库中用如下语句进行建表操作,然后弹出如题目的错误框信息“ORA-00955: 名称已由现有对象使用”,该怎么解决?
create table students (student_id number constraint pk_student primary key, student_name varchar2(10) not null,
subject varchar2(20), score number constraint chk_score check (score between 0 and 100) not null)
create table students (student_id number constraint pk_student primary key, student_name varchar2(10) not null,
subject varchar2(20), score number constraint chk_score check (score between 0 and 100) not null)
select table_name from user_tables where table_name = 'STUDENTS';
区分大小写不,要不直接先delete table students
你先drop table students;
删掉再建试试
但select时候,又查不到。
还有可能。同义词重名了。
在Synonyms(Oracle数据库,PL/SQL Developer 工具)条目下。 查看是否存在同义词。
有的话将同义词删除就可以了。