在PowerDesigner中的設計SQL Server 資料表時,要求通過vbScript腳本實作下面的功能:
主鍵:pk_TableName
外鍵:fk_TableName_ForeignKeyColumnList
當字段作為主鍵,而且類型為smallint,int,bigint,那麼要設定Identity =true.
當字段作為主鍵,而且類型為uniqueidentifier,那麼要設定預設值為newid(),而且設定擴充屬性rowguidcol.
在PowerDesigner中的設計SQL Server 資料表時,要求通過vbScript腳本實作下面的功能:
主鍵:pk_TableName
外鍵:fk_TableName_ForeignKeyColumnList
當字段作為主鍵,而且類型為smallint,int,bigint,那麼要設定Identity =true.
當字段作為主鍵,而且類型為uniqueidentifier,那麼要設定預設值為newid(),而且設定擴充屬性rowguidcol.