Skip to content

Generating SQL for a Table

Using the Script Table dialog, you generate SQL for one or more tables, such as a SELECT, INSERT or CREATE TABLE statement, and insert it in SQL Commander, save it to a file or copy it.

To open the dialog, select one or more tables in the Databases tab, right-click and select Script Table. Generating SQL for several tables at once is only in DbVisualizer Pro.

In the dialog, choose the type of statement to generate, and set options such as delimited identifiers, qualified names and the statement delimiter. Under Output Destination, choose whether to insert the text in an open or a new SQL Commander editor, save it to a file, or copy it to the clipboard. For an editor, you can also choose where to insert the text.

To format the generated SQL using your SQL formatting settings, select Format SQL. This option isn't available for CALL and Object Name, or when the legacy formatter is selected.

You can also open the dialog by dragging objects from the Databases tab to an editor; see Generating SQL for an object.