Adding a New Column to a Table Print this Topic Previous Page Up One Level Next page

Home >  Tutorials > "ZooDB" Database > Using Auto-Completion >

Adding a New Column to a Table

In the list of veterinarians of our tutorial zoo, currently the only contact information is the phone number, so the zoo authorities also want the e-mail address of the veterinarian. You will add a column, called "Email" of type varchar(50), to the table tblVeterinarians.



To create and execute an SQL ALTER statement using auto-completion:

1.Click the SQL Editor ic_new-sql-editor toolbar button to open a new SQL Editor window.
2.Enter "alt". The auto-completion window pops up.


3.Press Enter. The word "ALTER" appears in the SQL Editor.
4.Start typing "tab" and add the word "TABLE" after "ALTER". Your SQL statement should now be "ALTER TABLE".
5.Press Ctrl+Space to manually trigger auto-completion, select "tblVeterinarians" from the list and press Space.


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

ALTER TABLE [tblVeterinarians] ADD Email VARCHAR (50)

7.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