Andile Choko

Andile Choko

  • NA
  • 53
  • 54.4k

inserting the same uniqueidentiifier in to two tables using two stored procedures

Jun 3 2011 11:02 AM
Hi,

I have created two tables:

create table dawie
(
Id uniqueIdentifier default newId() primary key,
name varchar(25)
)


create table chk
(
guid uniqueIdentifier primary key,
name varchar(10),
id uniqueIdentifier foreign key references dawie(Id)
)


Now how do i insert into both tables using stored procedures?

the previous solution worked, thanx.

How do i do the same using 2 stored procedures,i.e.

create proc insert_into_chk
(
)

create proc insert_into_ dawie
(
)


Answers (3)