create proc delete_employee
(
@emp_id int
)
as
begin
delete from employee where emp_id=@emp_id
end
execute delete_employee 3011
create proc update_employee
(
@emp_id int,
@emp_salary int,
@emp_address nvarchar(100),
@emp_dept_id int
)
as
begin
update employee
set emp_salary=@emp_salary , emp_address=@emp_address ,dem_deptid=@emp_dept_id where emp_id=@emp_id
end
select * from employee
execute update_employee 2003,40000,'R-32 sector sec-11',2
No comments:
Post a Comment