Generating alter statements

Generate alter statements helps you to update the database with the changes on ERD. With the generate DDL option, you can preview a list of alter statements before actually applies to the database.

  1. Select Tools > Object-Relational Mapping (ORM) > Generate Database... from the main menu to open Database Code Generation dialog box.
  2. As a result, the Database Code Generation dialog box is opened.
    Database Code Generation dialog box is opened
    Database Code Generation dialog box is opened
  3. In the Database Code Generation dialog box, select Database only in Generate, Update Database in Generate Database, uncheck Export to database, check Generate DDL, Upper Case SQL, Formatted SQL and select JDBC in Connection.
  4. Click Database Options button to configure JDBC.
    Database options
    Database options
  5. Click OK button to generate. Assume some tables and columns were created in database already. The following is the example of generated statements:
    Alter statements
    Alter statements