TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ajay Shedge
NA
70
30.4k
Use of SQL transactions in stored procedure
Feb 9 2015 1:13 AM
Hi Friends,
In my project two tables one is Head and another is Detail.
Head table columns are - HeadId,Name,Address
Detail table columns are - DetailId (primary key), description, rate, HeadId(foreign key)
Sometimes what happend,Record is inserted only in Head table but not inserted in Detail table.I want to use transaction in stored procedure for insert record in both tables at a time. and one more thing is I want to insert more than one record in Detail table and in Head table insert only one record.
e.g. Head - 101,ABC,XYZ
Detail - 1,aaa,10,101
2,bbb,20,101
3,ccc,30,101
please give me solution for this scenario
Reply
Answers (
1
)
Grant Administrative Rights on SQL server 2012
User Defined Function