Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,


I Have a query Regarding Stored Procedure, I am Having Two Tables Parent and Child,
Parent - Primary Key Table,
Child - Foreign Key Table.

Parent Table Structure
Parent_Id - int,
FName - varchar,
LName - varchar,
Age int.

Child Table Structure
Child_Id - int,
Address - varchar,
State - varchar,
Country - varchar.

I Want To Insert Data In These Two Tables through One Sp.......

Can Anyone of u Can Know It Please Response it it's Very Important For Me...
Please Help Me ...
Posted
Comments
OriginalGriff 5-Jun-11 10:19am    
What is the problem? What have you tried and got stuck with?

This thread[^] should help you out.
 
Share this answer
 
Write queries in sp one by one with their respective valid parameter.

I think you should give a try than meke question here. Anyways...


CREATE PROCEDURE XYZ<br />
@Name VARCHAR(50),<br />
@Parameter2 INT,<br />
........<br />
.....<br />
AS<br />
BEGIN<br />
<br />
Insert INTO tbl_ABC(List of columns in which value to be inserted..) VALUES(Parameters..)<br />
<br />
....... Insert query 2 .............<br />
<br />
END
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900