PowerDesigner generates an SQL script for creating a database table

Source: Internet
Author: User
Tags powerdesigner
1. generate an SQL script for SQL Server or oracle table creation. 1. Create a physical model. Use the changecurrentdbms in the database menu to view the type of DBMS currently in use, such as sqlserver2000 or oracle10g, select sqlserver2000. 2. When the newly created dbms is sqlserver2000 physical

1. Generate SQL server 2000 or oracle table creation SQL Script 1. Create a physical model and view the type of dbms currently in use using the change current DBMS in the database menu, for example, SQL server 2000 or oracle 10g. Currently, SQL server 2000 is selected. 2. When the new dbms is SQL server 2000 physical

I,GenerateSQL server 2000 or oracle table creation SQLScript
  
1. Create a physical model. Use the change current dbms in the database menu to view the type of DBMS currently in use, such as SQL server 2000 or oracle 10g, select SQL server 2000.
  
2. Add tables and relationships to the new dbms's Physical Model of SQL server 2000. generate database under the database menu can export the table structure and relationships of the current DBMS into SQL statements.
  
3. If you want to change the table structure and relationship of SQL server 2000 to a 10 Gb table structure and relationship of oracl, you can use generate physical data model under the Tools menu and select DBMS as oracle10g.GenerateOracl10g table structure and relationship.
  
4. to export the table structure and relationship in oracl10g to an SQL statement, run generate database under the database menu to export the table structure and relationship of the current DBMS to an SQL statement.
  
  
Note: oracle10gGenerateThe SQL statement of May enclose the table name and field name in quotation marks. Do not worry, simply set it.
  
  
  
  
Ii. PowerDesignerGenerateDatabaseTable creation SQLScriptDouble quotation marks (the software version passed the test is PowerDesigner V15.1.0.2850)
  
PowerDesignerGenerateDatabaseTable creation SQLScriptEspecially OracleDatabaseThe table name is generally enclosed in quotation marks. In fact, the quotation marks are PL/SQL specifications,DatabaseThe table is created strictly according to the name in "". If "" is not found, the table is created according to the default settings of ORACLE (in dba studio). By default, all tables are written in uppercase. In this wayDatabaseThe field in is like "Column_1 ". If you remove the quotation marks, ORACLE automatically uses uppercase letters ("COLUMN_1") by default. Therefore, this SQL statement is executed in PL/SQL without quotation marks, in PL/SQL, it is automatically recognized as capital. If quotation marks are added, when SQL or hql queries "Column_1 = 'xxx'", an error is reported: ORA-00904: "COLUMN_1": Invalid identifier, unless it is written as 'column _ 1' = 'xxx '".
  
This problem isGenerateScriptTherefore, we can try to modify the corresponding format settings in the DBMS configuration file to solve this problem. Select "DBMS Properties" and select Script> SQL> Format. the comment of CaseSensitivityUsingQuote is "Determines if the case sensitivity for identifiers is managed using double quotes ", indicates whether double quotation marks are used to specify the case sensitivity of the identifier. You can see that the default value of values on the right is "YES", change it to "No", and click "Apply.

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.