Please enable JavaScript to view this site.

Altova DatabaseSpy 2020 Professional Edition

The instructions below show you how to add a new column to the table tblVeterinarians, using a SQL script typed manually. The new column should be called "Email" and its data type should be varchar(50).

 

Note:Entering a SQL statement is just one of the ways to add columns to an existing table. You can also add new columns visually from the Design Editor; see Adding Columns.

 

 

To create the new column:

1.Open the "ZooDB" project created previously and double-click the dbs_ic_connected ZooDBConnect data source to connect to it.

2. Click the SQL Editor ic_new-sql-editor toolbar button to open a new SQL Editor window.

3.Start typing "alt". The auto-completion helper pops up.

dbs_autocompletion_tutorial1

4.Press Enter. The word "ALTER" appears in the SQL Editor.

5.Start typing "tab" and add the word "TABLE" after "ALTER". Your SQL statement should now be "ALTER TABLE".

6.Press Ctrl+Space to manually trigger auto-completion, select "tblVeterinarians" from the list and press Space.

dbs_autocompletion_tutorial2

7.Continue creating the SQL statement until you have typed the following text:

ALTER TABLE [tblVeterinarians] ADD Email VARCHAR (50)

8.Execute the SQL statement by clicking the Execute ic_execute-sql button or pressing F5.

 

You have now created the new Email column. To view it in the Online Browser, click the Refresh database ic_refresh-datasource button.

© 2019 Altova GmbH