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!

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 793 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.