Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

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

Modern Systems Analysis And Design

Authors: Joseph Valacich, Joey George

8th Edition

0134204921, 978-0134204925

More Books

Students also viewed these Databases questions

Question

How can NGT be used for requirements determination?

Answered: 1 week ago