Generating DDL - Teradata Studio

Teradata Studio IDE Plug-in User Guide

Product
Teradata Studio
Release Number
15.11
Published
May 2016
Language
English (United States)
Last Update
2018-05-03
dita:mapPath
xjy1467322272664.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2043
lifecycle
previous
Product Category
Teradata Tools and Utilities
Data definition language (DDL) defines the structure of a database, including rows, columns, tables, indexes, and more. You can generate data definition language (DDL) for a database, database objects, or both using the Generate DDL wizard. The DDL is generated into a .sql file in an Eclipse project, or is executed directly on the specified Connection Profile. You can use this .sql file to create the same database object in a different database, or you can generate the DDL of a complete database to create a new database on a different server. You can edit the .sql file if you want to make changes.
  1. Display the Query Development perspective.
  2. In the Data Source Explorer, right-click a database, table, user-defined function, user-defined datatype, or a database view.
  3. Select the model elements to include in the DDL script and click Next.
    Option Description
    DROP statements Generates SQL drop statements. DROP statements remove an existing object from the database.
    CREATE statements Generates SQL CREATE statements.
    Comments Generates COMMENT statements.
  4. Select the model objects to include in the DDL script and click Next. The object type determines which model object options are available.
    Option Description
    Functions User-defined function
    Hash/Join Indexes Database, table
    Macros Database
    Databases Database
    Stored Procedures Stored procedure
    Tables Database, table
    Triggers Database, table
    User-Defined Types User-defined datatype
    Views database, view
  5. Select Save and run DDL options, then click Next.
    Option Description
    Folder Name Project folder name. You can click Browse to select a folder.
    File Name File name
    Preview DDL Previews the generated DDL.
    Open DDL File for Editing Opens SQL file in the SQL Editor.
  6. Click Finish.