Please enable JavaScript to view this site.

Altova DatabaseSpy 2020 Professional Edition

DatabaseSpy provides different methods for adding columns to a table: you can either define a new column from scratch in the Design Editor, or re-use an existing column definition from a different table.

 

Adding or deleting columns by altering the structure of an existing table must be supported by the database (or the database version).

 

 

To create a new column in Design Editor:

1.On the File menu, click New | Design Editor, or press Ctrl+D.

2.Do one of the following:

 

Select the table and choose the menu option Design Editor | Create New Column.

Press Alt+C.

Right-click the table and select Insert new | Column from the context menu.

Click the plus ic_add-column icon to the right of the last column name.

The column is inserted into the table and shows a New ic_new-column icon to the left of the column name which is highlighted for editing.

 

3.Enter a descriptive name for the column and press Enter. The SQL statement in the Database Structure Change Script window is updated.

4.Optionally, repeat steps 1 and 2 to insert additional columns.

5.Modify the column properties as required.

6.Optionally, change the column order by right-clicking a column and selecting Move Column Up or Move Column Down from the context menu.

7.Execute the change script.

 

 

To duplicate columns from other tables:

1.Select the column to be duplicated in the Online Browser or in the Design Editor and, keeping the mouse button pressed, drag it into the Columns section of the table design where you wish to add the column.

2.Optionally, edit the column properties and/or the column name.

3.Execute the change script.

 

 

To generate SQL for creating a column using an existing column definition:

1.In the Online Browser, right-click the column that serves as a model for the new column to be created.

2.Select the menu option Show in new SQL Editor | Add from the context menu.

3.In the SQL Editor, change the column name and edit the column definition, if required.

4.Click the Execute dbs_ic_execute_script button or press F5.

© 2019 Altova GmbH