日期:2014-05-18  浏览次数:20445 次

uniqueidentifier类型问题
我的数据库中,uniqueidentifier这个类型的一个字段是主键,我怎么向这里面添加数据呢?
uniqueidentifier这个类型以前从没用过...
求大神给点相关例子,或者代码

------解决方案--------------------
SQL code

create table aa(
id int,
n uniqueidentifier
)

insert into aa values(1,newid())

------解决方案--------------------
GUID或者NEWID的随机数