Quantcast
Channel: How to add a column with a default value to an existing table in SQL Server? - Stack Overflow
Viewing all articles
Browse latest Browse all 91

Answer by jithu thomas for Add a column with a default value to an existing table in SQL Server

$
0
0

OFFLINE and ONLINE pertain to how to ALTER table performed on NDB Cluster Tables.NDB Cluster supports online ALTER TABLE operations using the ALGORITHM=INPLACE syntax in MySQL NDB Cluster 7.3 and later. NDB Cluster also supports an older syntax specific to NDB that uses the ONLINE and OFFLINE keywords. These keywords are deprecated beginning with MySQL NDB Cluster 7.3; they continue to be supported in MySQL NDB Cluster 7.4 but are subject to removal in a future version of NDB Cluster.

IGNORE pertains to how the ALTER statement will deal with duplicate value in the column that has newly added constraint UNIQUE. If IGNORE is not specified, ALTER will fail and not be applied. If IGNORE is specified, the first row of all duplicate rows is kept, the reset deleted and the ALTER applied.

The ALTER_SPECIFICATION would be what you are changing. what column or index you are adding, dropping or modifying, or what constraints you are applying on the column.

ALTER [ONLINE | OFFLINE] [IGNORE] TABLE tbl_name       alter_specification [, alter_specification] ...    alter_specification:        ...        ADD [COLUMN] (col_name column_definition,...)        ...Eg: ALTER TABLE table1 ADD COLUMN foo INT DEFAULT 0;

Viewing all articles
Browse latest Browse all 91

Latest Images

Trending Articles





Latest Images