More Troubleshooting
If you receive error messages when you are altering tables or inserting data, use the Metadata command as your resource.
- Show the definition for each table that you entered by hand and compare the output to the SQL code that this document instructs you to enter.
- When you find a problem, you can either drop the table and recreate it, or use ALTER TABLE to drop a column and then add the column again with the correct definition. If you misspelled the name of the table itself, you must drop the table and recreate it.
- The DROP TABLE statement has the following syntax:
DROP TABLE tablename
- To change a column definition, first drop it using the ALTER TABLE statement:
ALTER TABLE tablename DROP columnname
- Then add the column back in using the ALTER TABLE statement again:
ALTER TABLE tablename ADD columnname columndef
If you made any typing errors when creating the domains and tables, you will get errors when you try to insert data by hand or to run the Inserts.sql and Update.sql scripts. If you follow the steps above, you will be able to fix your errors and run the scripts successfully.
The remainder of the tutorial is less demanding, in that it focuses on the SELECT command. Once you detect and fix any errors in the domain and table definitions, you will get the correct results from your SELECT statements