Oracle database report bug, table or attempt does not exist, table name contains spaces

Source: Internet
Author: User
Tags lowercase
One

1. Start: The fields in the SQL code exported through Powderdesiger are lowercase and are then imported directly into Oracle.

2.bug: Unable to modify the table structure (in PL/SQL developer)---include adding delete modifications ...

3.

Obviously the table is there, delete times: Table or view does not exist ~!

Line 1th Error:
ORA-00942: The table or view does not exist

and then finally found out because my table name is lowercase, but uppercase does not appear this problem.
under normal circumstances .... The data in the dictionary is all uppercase,,,, dynamic view is lowercase ... When you use a keyword to make a table or other object's name, use the "" so that the

table name is used to cause the form to be
deleted with cascade constraints the constraint associated with it is deleted

the table that needs to be deleted is available in a select query, with the following code


--Query FOREIGN KEY constraint  
select ' Alter table ' | | table_name| | ' '||' Drop Constraint ' | | '|| constraint_name| | '; '
  From user_constraints  
  where constraint_type = ' R ' and  
  table_name like ' ta/_% ' escape '/';
--Query table name
 select ' Drop table ' | | table_name| | ' '||';'
  From User_tables
  where table_name like ' ta/_% ' escape '/';


Two.

1. When the table is generated, the table name is not checked, the table is directly built, the result, the table has the primary key, and there are foreign keys, delete ah deleted, double quotes caused no effect

2. Report bugs, invalid characters, or bugs that don't exist in a table or view

3. Fix, change table name, then delete

Code: ALTER TABLE "Tbl_cert ificate _type" Rename to "TABLE2";

Here, double quotes cause the table name, where the double quotes function differently than the previous double quotes, and the previous double quotes are lowercase table names, which causes the table names to be discontinuous.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.