Need Help in SQL Server "Stored Procedure"
-
I know how to make a Stored Procedure that its data affect in one TABLE. The problem is that I'm making a three tier project, and I'm inserting, Updating Reading and Deleting data to tables using Stored Procedure. My question is, how to make a tored procedure that its data are affecting two tables? For example. TABLE1 has coulmns Name and Age, and TABLE2 has columns Year and Time. How to programm one procedure using parameters of two tables. P.S. Is it possible to create a procedure that its data can be stored in two tables? Thank you in advance for your time.
-
I know how to make a Stored Procedure that its data affect in one TABLE. The problem is that I'm making a three tier project, and I'm inserting, Updating Reading and Deleting data to tables using Stored Procedure. My question is, how to make a tored procedure that its data are affecting two tables? For example. TABLE1 has coulmns Name and Age, and TABLE2 has columns Year and Time. How to programm one procedure using parameters of two tables. P.S. Is it possible to create a procedure that its data can be stored in two tables? Thank you in advance for your time.
Have no idea what database program you are using so I will speak about MS SQL Server. A stored procedure may touch many tables. One set of data may be put into many tables. If Table1 and Table2 do not have a shared column (PersonID for example) it becomes very hard to join the two.
-
Have no idea what database program you are using so I will speak about MS SQL Server. A stored procedure may touch many tables. One set of data may be put into many tables. If Table1 and Table2 do not have a shared column (PersonID for example) it becomes very hard to join the two.
-
I solved the problem. Thank you a lot. I used the nested BEGIN and END between two tables. Cheers.