TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
roy himanshu
NA
126
0
How to insert different records into multiple sql tables with same uniqueidentifier in sql server
Aug 31 2009 4:38 AM
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
Reply
Answers (
2
)
the same unique number in all tables?
How to count number of entries depending on the string in a field in sql