Previous Topic: Dynamic SQL for Arbitrary Statement-TypesNext Topic: SQL Status Tables


Other Tasks

After your SQL tables are defined to the CA Datacom Datadictionary, you can create views based on one or more tables. You can also create a view based on one or more views. Views allow you to retrieve only that data which is significant for your purposes.

You can create synonyms for your tables and views, or for tables and views owned by other authorization IDs. Synonyms are short names for tables or views.

You can define a new index on one or more columns of a base table.

When making changes to data, you can control access to SQL tables through the isolation level Preprocessor option, or with the LOCK TABLE statement.

If you no longer need a table, view, synonym, or index, you can drop the SQL object using the DROP statement. If you have created an SQL object simply for testing purposes or only for the run of an application, you can use the DROP statement to remove this object from CA Datacom Datadictionary.

Important! If you remove an SQL object from CA Datacom Datadictionary, you must recreate the object you dropped if you want to use it again.

If a table is dropped, all views and synonyms based on that table are removed from CA Datacom Datadictionary. The table definition is removed from the CA Datacom Datadictionary and the CA Datacom/DB Directory (CXX), the table data is deleted and the space is reclaimed.

If a view is dropped, all views and synonyms based on the view are removed from CA Datacom Datadictionary.

If a synonym is dropped, only that synonym is removed from CA Datacom Datadictionary.

If you drop an index, all plans dependent on the indexed table are marked invalid. You can run a CA Datacom Datadictionary Relationship Report to find out what plans are dependent on a table. See the CA Datacom Datadictionary Batch Reference Guide for information about running a Relationship Report.