Sybase Technical Library - Product Manuals Home
[Search Forms] [Previous Section with Hits] [Next Section with Hits] [Clear Search] Expand Search

Description [Table of Contents] Parameters

Reference Manual: Commands

[-] Chapter 1 Commands
[-] alter table
[-] Syntax

Syntax

alter table [[database.][owner].table_name
    { add column_name
datatype
        [default {constant_expression | user | null}]
        {identity | null | not null} 
        [off row | in row]
        [ [constraint constraint_name]
        { { unique | primary key }
            [clustered | nonclustered]
            [asc | desc]
            [with { fillfactor = pct,
                max_rows_per_page = num_rows,
                reservepagegap = num_pages }]
            [on segment_name]
        | references [[database.]owner.]ref_table 
            [(ref_column)]
            [match full]
        | check (search_condition) ] ... }
        [, next_column]...
    | add {[constraint constraint_name]
    {  unique | primary key}
            [clustered | nonclustered]
            (column_name [asc | desc]
        [, column_name [asc | desc]...])
        [with { fillfactor = pct,
                max_rows_per_page = num_rows, 
                reservepagegap = num_pages}]
        [on segment_name]
    | foreign key (column_name [{, column_name}...])
        references [[database.]owner.]ref_table        [(ref_column [{, ref_column}...])]
        [match full]
    | check (search_condition)}
    | drop {column_name [, column_name]... 
        | constraint constraint_name }
    | modify column_name datatype [null | not null] 
        [, next_column]...
    | replace column_name
        default { constant_expression | user | null}
    | partition number_of_partitions
    | unpartition
    | { enable | disable } trigger
    | lock {allpages | datarows | datapages } }
    | with exp_row_size=num_bytes

Description [Table of Contents] Parameters