Generating a CREATE Statement
You can also generate SQL statements based on an existing table or column. In this step, we will generate a CREATE statement from the table tblZookeepers, edit the statement, and use it to create a new table tblEmployees.
To add a table by editing a CREATE statement generated from an existing table:
1.Open the "ZooDB" project created previously and double-click the ZooDBConnect data source to connect to it.
2.In the Online Browser, right-click the tblZookeepers table.
3.Select the menu option Show in new SQL Editor | Create from the context menu. An SQL Editor window appears, displaying the following SQL statement:
4.Edit the statement as shown below to create tblEmployees. The parts of the statement that need to be changed are marked using underlined, italic text:
5.Click the Execute button or press F5.In the Online Browser, right-click the ZooDB database and select Refresh from the context menu, or click the Refresh button.
The newly inserted table, tblEmployees, is displayed along with the tables that you created earlier.