开发者

SQL Server SMO create Auto Numbering Index Column

开发者 https://www.devze.com 2022-12-11 10:19 出处:网络
I have a project in C# where I create my tables in SQL server using the Server Management Objects for SQL Server in my program.

I have a project in C# where I create my tables in SQL server using the Server Management Objects for SQL Server in my program.

I need to create a column using SMO in C# where the primary key field is an autonumbering field.

Can someone tell me how that is accomplished using SMO in C开发者_JAVA百科#?

Tony


http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.management.smo.column_members.aspx

Column has 3 properties: Identity, IdentityIncrement, IdentitySeed

0

精彩评论

暂无评论...
验证码 换一张
取 消