Enhancement about Generate SQL feature

Hi

I am wondering if it is possible to put the create primary key as part of create table statement for MYSQL, At the moment if you have declared a field with auto-increment a primary key must be set on that field. I copied the script to MYSQL Query Browser to create the table for the database.

Another enhancement that I can think of is, i would be grateful it has an options to choose the number of line space between different SQL statement. At the moment after generated a sql E.g. Create table, it will have a line space because it has another generate SQL script like Alter table to add a Primary key. Unfortunary if i paste the whole generated script to MySQL Query Browser, it not run the script as it, as it will treat the line space as a empty string. so I have to copy the command one by one.

If you want to read each of the SQL script clearer, you can choose to have double or even more line space in between. = ) that would be good.

I just find some problem on the script that generated by Toad Data Modeller, I am currently using MYSQL 5.0. I have the following SQL Script

*“You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘to Invoices FOREIGN KEY (Customer_ID) REFERENCES Customer_ID (Customer_ID)’ at line 1”

ALTER TABLE Invoices ADD CONSTRAINT Customers to Invoices FOREIGN KEY (Customer_ID) REFERENCES Customers (Customer_ID) ;*
*Customers to Invoices" is the name of the reference.

Please let me know if you want me to explain more.

Many thanks

Chi

Message was edited by: Chi

Hello Chi,

I am wondering if it is possible to put the create primary key as part of create table statement for MYSQL.

At the moment, it's not possible. However, we will deal with this issue. CR # 36 309.

i would be grateful it has an options to choose the number of line space between different SQL statement.

Thanks for this suggestion. We will deal with it in the future. CR # 36 301.

I just find some problem on the script that generated by Toad Data Modeller, I am currently using MYSQL 5.0. I have the following SQL Script...

FK Constraint is taken from relationship name, and this constraint cannot contain spaces if quotations are not used.
There are two possible solutions:
a) Rename relationship name (in Caption, you can leave the spaces).
b) Before you start generating the DDL script, click the Detail Settings tab and select the Use Quotations checkbox.

If you have any questions, please write us back. Thanks.

Vladka + Mario

Hi

I am wondering if it is possible to provide Search/Find/Replace facility on SQL Script Preview windows, when you click on show code windows on DDL Script generation windows. (cannot remember what is call), so the user could use this function to find the specific SQL they may want to check in the preview windows.

Please let me know if you want me to explain more.

Many thanks

Chi

Hello Chi,

Thanks for your suggestion. We will deal with it. CR # 36 439 - Add Search/Find/Replace facility on SQL File Viewer dialog (DDL Script Generation dialog | Generate -> Show Code).

Thanks very much!

Regards,

Vladka