通过ADO可以访问sql server,并且实现sql server建表,下面为您介绍使用ADO在sql server建表的方法,供您参考,希望对您学习sql server建表有所帮助。
- CREATE TABLE
- [
- database_name.[owner].
- | owner.
- ] table_name
- (
- {
- | column_name AS computed_column_expression
- |
- } [,...n]
- )
- [ON {filegroup | DEFAULT} ]
- [TEXTIMAGE_ON {filegroup | DEFAULT} ]
- ::= { column_name data_type }
- [ [ DEFAULT constant_expression ]
- | [ IDENTITY [(seed, increment ) [NOT FOR REPLICATION] ] ]
- ]
- [ ROWGUIDCOL ]
- [ ] [ ...n]
- ::= [CONSTRAINT constraint_name]
- {
- [ NULL | NOT NULL ]
- | [ { PRIMARY KEY | UNIQUE }
- [CLUSTERED | NONCLUSTERED]
- [WITH FILLFACTOR = fillfactor]
- [ON {filegroup | DEFAULT} ]]
- ]
- | [ [FOREIGN KEY]
- REFERENCES ref_table [(ref_column) ]
- [NOT FOR REPLICATION]
- ]
- | CHECK [NOT FOR REPLICATION]
- (logical_expression)
- }
- ::= [CONSTRAINT constraint_name]
- {
- [ { PRIMARY KEY | UNIQUE }
- [ CLUSTERED | NONCLUSTERED]
- { ( column[,...n] ) }
- [ WITH FILLFACTOR = fillfactor]
- [ON {filegroup | DEFAULT} ]
- ]
- | FOREIGN KEY
- [(column[,...n])]
- REFERENCES ref_table [(ref_column[,...n])]
- [NOT FOR REPLICATION]
- | CHECK [NOT FOR REPLICATION]
- (search_conditions)
- }
【编辑推荐】