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.