Question: Write a script that attempts to insert a new division named Guitars into the Division table. If the insert is successful, the script should display

Write a script that attempts to insert a new division named "Guitars" into the Division table. If the
insert is successful, the script should display this message:
SUCCESS: Record was inserted.
If the update is unsuccessful, the script should display a message something like this:
FAILURE: Record was not inserted.
Error 2627: Violation of UNIQUE KEY constraint
'UQ__Division_5A98D48EAD30FDC4'. Cannot insert duplicate key in object
'dbo.Division'. The duplicate key value is (Guitars).
Write a script that attempts to insert a new

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!