thenrich
asked on
Field increment
I'm creating a table like the 1 below through VB.NET
'' New table string
Dim tmpSql As New StringBuilder
tmpSql.Append("CREATE TABLE TOPS_CREW_CRANE (")
tmpSql.Append("TypeID int, ")
tmpSql.Append("Sequence nvarchar(5), ")
tmpSql.Append("Description nvarchar(100), ")
tmpSql.Append("BaseQty tinyint, ")
tmpSql.Append("Factor decimal(15, 3))")
How can I make TypeID an identity field so it automatically increments?
'' New table string
Dim tmpSql As New StringBuilder
tmpSql.Append("CREATE TABLE TOPS_CREW_CRANE (")
tmpSql.Append("TypeID int, ")
tmpSql.Append("Sequence nvarchar(5), ")
tmpSql.Append("Description
tmpSql.Append("BaseQty tinyint, ")
tmpSql.Append("Factor decimal(15, 3))")
How can I make TypeID an identity field so it automatically increments?
ASKER
SQL server 2005
sorry
sorry
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try "TypeID int auto_increment,"