Question: create a stored procedure using Sybase or Microsoft that will delete an employee from a sample emp table. This table probably exists in your database

create a stored procedure using Sybase or Microsoft that will delete an employee from a sample "emp" table. This table probably exists in your database already but if it does not, there is code to create it in the HW directory. Make sure you use proper transaction control and error checking as described in class. 

1. Log into your Sybase or Microsoft server and verify you have an "emp" table. If not, create one from the available script.

2> 12 use db25 go 1 select * from emp 2> go emp_id emp_name Jones Smith 3 Potter 4 Clinton (4 rows affected) 

2. Create a procedure called usp_delete_yourName. This procedure will take a single integer value as input and delete the employee with that emp_id. I would recommend you create this procedure in a text file first, then copy it to a command tool for compilation and execution (as shown in class). Below is an example (not complete) of what your procedure might look like: 


Create procedure usp_delete_shasho 


(@emp_id int) 


as


Begin 

.

.

End

2> 12 use db25 go 1 select * from emp 2> go emp_id emp_name Jones Smith 3 Potter 4 Clinton (4 rows affected) 1> salary dept_code 00 SALE .00 SALE 00 TECH .00 MNGT

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

CREATE PROCEDURE uspdeleteyourName empid INT AS BEGIN DECLARE empnam... 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!