PowerDesigner generates SQL table name with quotation number solution

When powerdesigner connects to oracle11g, I created a table aaa
The generated SQL statement is:
drop table ” aaa” cascade constraints;

create table “aaa”
(
“id” INT not null,
“name” NVARCHAR2(20),
“createdate” DATE,
constraint PK_AAA primary key (“id”)
);

comment on table “aaa” is’test aaa table’;

(if This happens only when the table name and field name have lowercase letters. If you change to all uppercase letters, this situation will not happen.)

After execution, the aaa table can be seen in the table in plsql, but when select * from aaa is executed, it always prompts that the table does not exist. The execution of select * from “aaa” is correct, indicating that the double quotation marks are hidden in the table name.

So we should remove the quotation marks that come with SQL when generating SQL, the setting method is as follows:
< strong>Database �> Edit Current DBMS… �> General �> Script �> Sql �> Format �> CaseSensitivityUsingQuote Change the Value value to No and click Apply to confirm.

The generated sql is:
drop table aaa cascade constraints;

create table aaa
(
id INT not null,
name NVARCHAR2(20),
createdate DATE,
constraint PK_AAA primary key (id)
);

comment on table aaa is
‘test aaa table’;

This way the quotation marks are removed. Executing select * from aaa in plsql will also be normal!

Leave a Comment

Your email address will not be published.