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
narasiman rao
NA
519
768.5k
how to handle the error in transaction sql
Oct 6 2017 10:29 AM
Create Proc TranTest
AS
BEGIN TRAN
INSERT INTO [authors]([au_id],
[au_lname],
[au_fname],
[phone],
[contract])
VALUES ('172-32-1176',
'Gates',
'Bill',
'800-BUY-MSFT',
1)
-- First Update query
UPDATE authors
SET au_fname = 'Johnzzz'
WHERE au_id = '172'
-- second Update query
UPDATE authors
SET au_fname = 'Johnzzz'
WHERE au_id = '175'
--third Update query
UPDATE authors
SET au_fname = 'Johnzzz'
WHERE au_id = '178'
COMMIT TRAN
GO
in the above i written three update statement, if suppose in the second update statment gets error, whether the first update statement record gets updated.
for that how to handle using transact sql
Reply
Answers (
1
)
Please help me to optimize below stored procedure
when we change in domain name what happens for old users?