Creating a Column

Create a new column for a table in the Table Schema Editor.

Prerequisites 

Before you can create a column, be sure that the database server that the contains the table for which you want to add a new column is running, and that you connected to the database through a connection profile.

  1. Expand the Tables folder, right-click on Columns and select New > Column .

    The Table Schema Editor opens on the Columns page.

  2. Enter column information.
    Field Description
    Primary Key Select the check box to define the primary key.
    Column Name Enter a name for the column.
    Datatype Enter the datatype associated with the column.
    Nullable Select the check box to indicate that the column can be NULL.
    Default View the column default value. This is a read-only column. When you double-click the cell, a Browse button appears. You can click Browse to open the Column Default Value dialog.
    Rule Binding (ASE only) Specify a rule to bind the column to by selecting a rule from the drop-down menu.
    Identity (ASE only) Select to make this column an IDENTITY column. ASE automatically generates a value for this row that uniquely identifies the row within the table.
    Check Constraint (ASE only) Click ... to open the Define column check constraint wizard.
    IQ Unique (Sybase IQ only) Define the cardinality of the column. This column is used to optimize the indexes internally. Specify the IQ Unique constraint if the expected number of unique values is less than or equal to 65536. The default is 0.
    Comment (SQL Anywhere, Sybase IQ only) Enter addtional comments about the column.
  3. (Optional) Continue to add additional columns.
  4. When finished defining columns, select File > Save from the WorkSpace main menu.

    The Preview Changes window displays.

  5. Click Save to execute the SQL commands and to save the new columns to the database.
Related tasks
Editing Table Schema Data
Entering Column Default Values
Copying a Column
Cutting a Column
Pasting a Column
Dropping a Column

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com