ORA-00942: The table or attempt does not exist

Source: Internet
Author: User
Tags powerdesigner
Depressing: powerdesigner generates the Oracle table creation script, but the generated table cannot be inserted, exp, update, drop reports ORA-00942: Table or try not to have an exception, I thought it was caused by Oracle configuration. I found a lot of posts online! Deleted users in all ways ...... Drop user lizhiyu cascade;

Improper: Use the Oracle table creation script generated by powerdesigner to re-create the database. The results are the same. You can only take a closer look at the table structure. The table creation statement is as follows:

-- Create Table
Create Table s
(
"Sid" number not null,
"Sname" varchar2 (20 ),
Sex varchar2 (2 ),
"Birthday" Date
)
Tablespace System
Pctfree 10
Pctused 40
Initrans 1
Maxtrans 255
Storage
(
Initial 64
Minextents 1
Maxextents Unlimited
);

 

If you are familiar with the database, you will find the problem. Open the script generated by powerdesigner as follows:

Create Table "S "(
"Sid" number not null,
"Sname" varchar2 (20 ),
"Sex" varchar2 (2 ),
"Birthday" date,
Constraint pk_s primary key ("Sid ")
);

All table names and columns are enclosed in double quotation marks for lowercase letters.

Although the table name and field name of the database are case-insensitive, there are double quotation marks and no double quotation marks. How is double quotation marks? When designing a field name in powerdesigner, the SQL script is exported with double quotation marks on lower-case letters !!! As a result, the Oracle table is successfully created but cannot be operated!

Think about it: since it can be set up, it will certainly be able to operate. I tried to drop table "S". Well, it is easy to remove all double quotation marks in DDL statements. The problem is solved.

The specific solution is as follows:ArticleHttp://www.cnblogs.com/chinafine/articles/1847010.html.

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.