The Generate DDL wizard generates the SQL CREATE and DROP statements for databases and database objects. You can save the SQL to a script file, and execute the DDL script from the SQL Editor.
For Aster systems, this only applies to Aster 6.10 and later.
- In the Data Source Explorer, click to select one or more of the same type of database object. .
- Right-click one of the selected objects and click database_type > Generate DDL, where database_type is the type of database for the current connection profile, for example, Teradata or Aster. The Objects dialog of the Generate DDL wizard opens.
- Select the types of DDL statements you want to generate for the selected objects, and click Next.
- Select the classes of objects for which the DDL will be generated, and click Next. The object definitions you are able to generate depend on the type of object you selected in Data Source Explorer. The wizard generates the DDL and displays the resulting script in the Save DDL page.
- Use the Folder and File Name fields to specify where you want the wizard to save the generated script. The default is the SQL folder displayed in the Project Explorer. Click Browse to specify a different folder.
- Review the generated DDL script in the Preview DDL area.
- [Optional] Select the Open DDL file for Editing check box to open this SQL file in an SQL Editor when you click Finish.
- Click Next.
- Review the Summary of selections you made in previous steps. To make changes, click Back to return to a previous panel of the wizard and make your change.
- Click Finish. The script file is saved to the location and file name you specified, and appears in the Project Explorer view. If you chose to open the DDL file for editing, the generated DDL displays in the SQL Editor where you can edit it and save or execute the edited DDL.