没有类似于select scope_identity()这样的函数,最好在应用程序中自己生成GUID 插入数据库,
这样就不需要利用主键默认值是newid(), 或者在后台使用newid()生成GUID
DECLARE @myid uniqueidentifier
SET @myid = NEWID()
insert into table1 (PK_FIELD)
values (@myid)