Question: Write and submit a create stored procedure statement for a stored procedure named EmpOrderCount in the dbo schema that takes a territoryid as a parameter.

Write and submit a create stored procedure statement for a stored procedure named EmpOrderCount in the dbo schema that takes a territoryid as a parameter. The parameter must be named TerritoryID. The parameter should default to null. The stored proc should not return the rowcount. The stored proc should raise a SQL Server error with a severity of 11, a message saying “@TerritoryID not in table” with a state of 1 when the given @TerritoryID is not in the Territories table.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Heres a SQL Server stored procedure named EmpOrderCount in the dbo schema that meets your re... View full answer

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 Databases Questions!