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
Heres a SQL Server stored procedure named EmpOrderCount in the dbo schema that meets your re... View full answer
Get step-by-step solutions from verified subject matter experts
