declare @myKey uniqueidentifier
select
@myKey = newId()
insert into persons (id,lastname,firstname)
values(@myKey,'hai','world')
insert into persons1(id,c1,c2)
values(@myKey,'hello','roy')
hi,this is my code.but still now iam getting error.the error message also i pasted here.plz rectifie my problem,plz.iam faceing this problem since several hours.plz help me. the error message is
Msg 206, Level 16, State 2, Line 5
Operand type clash: uniqueidentifier is incompatible with int
Msg 206, Level 16, State 2, Line 9
Operand type clash: uniqueidentifier is incompatible with int
Roei BarPosted Aug 31, 2009, 6:47 AM
here is the fixed Command:
roy himanshuPosted Aug 31, 2009, 7:17 AM
himanshu