Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Compare and explain the difference between the two statements. Statement 1: CREATE PROCEDURE Insert_data AS INSERT INTO Student Test VALUES ('1', 'Peter', 'Gallert', 'Male') EXECUTE

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Compare and explain the difference between the two statements. Statement 1: CREATE PROCEDURE Insert_data AS INSERT INTO Student Test VALUES ('1', 'Peter', 'Gallert', 'Male') EXECUTE Insert_data Statement 2: BEGIN INSERT INTO Student Test VALUES ('1', 'Peter', 'Gallert', 'Male') END on 2 et Compare and explain the difference between the two statements Statement 1: red d out of CREATE PROCEDURE Insert_data @Data INT g question AS BEGIN SELECT @Data = Student_no FROM Student Test; PRINT @Data END EXECUTE Insert_data '1' Statement 2: DECLARE @Data INT BEGIN SELECT @Data = Student_no FROM Student Test: PRINT @Data END tion 3 wet ered Consider the following code, and please explain what the outcome will be: ced out of ALTER Procedure [dbo].[DeleteStudent Transaction]@ld INT AS ag question BEGIN TRY BEGIN TRANSACTION DELETE FROM Student WHERE Id=@id RAISERROR(Some Random Error', 16.1) COMMIT END TRY BEGIN CATCH ROLLBACK END CATCH Ps lenovo estion 6 Can you please explain the following code? yet wered BEGIN TRY rked out of DECLARE @x int SELECT @x = 1/ Flag question PRINT 'This statement will not be executed' END TRY BEGIN CATCH PRINT The error message is: + error message END CATCH

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+j Explain the essential nature of repatriation.

Answered: 1 week ago