To create a CALC key for an empty table, use the SQL DDL CREATE CALC statement.
If the table is not empty, you must drop and recreate the table, adding the CALC key before reloading the table's data.
Note: For the steps involved in this process, see Chapter 30, “Modifying Schema, View, Table, and Routine Definitions” .
Considerations
Only one location mode is permitted for a table. If the table is stored clustered on an index or constraint, you must drop the clustering index or constraint and re-add it as non-clustered before you can create a CALC key.
Example
In the following example, a unique CALC key is created for the EMPLOYEE table.
create unique calc key on emp.employee (emp_id);
|
Copyright © 2014 CA.
All rights reserved.
|
|