WEB开发网
开发学院数据库MSSQL Server MS SQL入门基础:SQL数据库表的修改 阅读

MS SQL入门基础:SQL数据库表的修改

 2007-01-03 09:20:00 来源:WEB开发网   
核心提示: | {CHECK | NOCHECK} CONSTRAINT{ALL | constraint_name[,...n]}| {ENABLE | DISABLE} TRIGGER{ALL | trigger_name[,...n]}}<column_definition> ::=

| {CHECK | NOCHECK} CONSTRAINT

{ALL | constraint_name[,...n]}

| {ENABLE | DISABLE} TRIGGER

{ALL | trigger_name[,...n]}

}

<column_definition> ::= { column_name data_type }

[ [ DEFAULT constant_expression ]

| [ IDENTITY [(seed, increment ) [NOT FOR REPLICATION] ] ]

]

[ ROWGUIDCOL ]

[ COLLATE < collation_name > ]

[ <column_constraint>] [ ...n]

<column_constraint> ::= [CONSTRAINT constraint_name]

{ [ NULL | NOT NULL ]

| [ { PRIMARY KEY | UNIQUE }

[CLUSTERED | NONCLUSTERED]

[WITH FILLFACTOR = fillfactor]

[ON {filegroup | DEFAULT} ] ] ]

| [ [FOREIGN KEY]

REFERENCES ref_table [(ref_column) ]

[ ON DELETE { CASCADE | NO ACTION } ]

[ ON UPDATE { CASCADE | NO ACTION } ]

[NOT FOR REPLICATION ] ]

| CHECK [NOT FOR REPLICATION]

(logical_expression)}

<table_constraint> ::= [CONSTRAINT constraint_name]

{ [ { PRIMARY KEY | UNIQUE }

[ CLUSTERED | NONCLUSTERED]

{ ( column [ ASC | DESC ] [,...n] ) }

[ WITH FILLFACTOR = fillfactor]

[ON {filegroup | DEFAULT} ] ]

| FOREIGN KEY

[(column[,...n])]

REFERENCES ref_table [(ref_column[,...n])]

[NOT FOR REPLICATION]

[ ON DELETE { CASCADE | NO ACTION } ]

[ ON UPDATE { CASCADE | NO ACTION } ]

| CHECK [NOT FOR REPLICATION]

上一页  1 2 3 4 5  下一页

Tags:MS SQL 入门

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接