Adding Tables Print this Topic Up One Level

Home > 

Adding Tables

When the Design Editor is connected to a data source, you can either show the design of existing tables by dragging them into the Design Editor window or by using a context menu command to do so, or you can create an entirely new table from scratch. Design Editor's table design shows the most important properties of the table and you can add indexes, keys, and check constraints with a few mouse clicks.


To show an existing table in the Design Editor:


Do one of the following:


Right-click the table you want to examine in the Online Browser and select Design Editor | Show in new Design Editor from the context menu.


If a Design Editor window is already open, you can also right-click the table and drag it into the Design Editor window or use the context menu command Design Editor | Add to Design Editor to add the table to the design.


To create a new table in Design Editor:


1.Optionally, choose the menu option File | New | Design Editor or press Ctrl+D to open a new Design Editor window. Alternatively, click the Design Editor Design Editor (Ctrl+D) icon in the Standard toolbar.


2.Click the New Table New Table (Ctrl+T) icon in the Design Editor toolbar or press Ctrl+T. Alternatively, right-click into the Design Editor and choose Create new Table from the context menu.


3.DatabaseSpy displays a message informing you that a change script has been created. Optionally, activate the Don't show this dialog again! check box and click OK.


4.In the table design, double-click the title bar to edit the table name.


5.To complete the table definition, modify the column properties, add columns, define a primary key, add a foreign key relationship, or define an index.


6.In the Database Structure Change Script window, click the Execute Execute the generated SQL Change Script button to commit the changes to the database-

© 2019 Altova GmbH