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
(
)
Loading

raghu vPosted Jun 3, 2011, 10:07 AM
try to create the stored proc as below
have assumed the function will work
hint : http://blog.sqlauthority.com/2007/03/25/sql-server-identity-vs-scope_identity-vs-ident_current-retrieve-last-inserted-identity-of-record/