

Creating SQL Objects › Creating a Table
Creating a Table
Use a CREATE TABLE statement to define a table to CA Datacom/DB and CA Datacom Datadictionary. Enter the CREATE TABLE statement in the numbered area of an EDIT Source Member Panel. See How to Submit SQL Statements for the steps to obtain the panel and an explanation of the fields on the panel. See CREATE TABLE for the syntax of the statement. The SQL statement performs the following:
- Specify the table name.
- Define the columns in the table and specify their data type and length (the columns in the table are defined as FIELD occurrences in CA Datacom Datadictionary ). The columns and tables must follow the SQL naming conventions. See Naming Conventions.
- Designate if one or more columns are to have a unique value for each row in the table. Use of the UNIQUE constraint generates a KEY entity-occurrence in the CA Datacom Datadictionary.
Note: Uniqueness is enforced at the key level, not at the column level, that is to say, UNIQUE forces unique values for the entire key and not for the individual columns making up the key.
- Designate other constraints in addition to UNIQUE. See the sections starting with Column Constraint Definition.
- Indicate the area where the table data is to reside.
Copyright © 2014 CA.
All rights reserved.
 
|
|