enter data in 2 table at the same time
Posted on 2011-09-08
I want to enter data in two table at the same time and I am writing stored procedure for that.
Like you can consider customer table
For Payment table
Primarykey,UerID(Primarykey of customer tbale),Credictcardnumber,CVVcode,Expirationdate
I want to first enter data in custoemr table at the same time primarykey of custoemr tbale I want to enter in payment tbale.
I want to write stored procedure but I really don't know how can I enter custoemr table primary key into payment table at the same time.
Please help me out.I am not that much good in SQL