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
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
How to use Try catch in sql server and print the error message
Karthikeyan Anbarasan
Mar 30, 2011
3.7
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
This blog shows on how to use Try catch in sql server and print the error message
BEGIN TRY
DELETE FROM tablesamaple where strsampletodelete = 'todelete'
END TRY
BEGIN CATCH
Print ERROR_MESSAGE()
END CATCH
This blog shows on how to use Try catch in sql server and print the error message
Next Recommended Reading
Write A Query To Print 1 To 100 In SQL Server Using Without Loop