Saturday, January 2, 2016

SQL PROCEDURE CONCEPT

create proc usp_Del
@id int
as
delete from Employee where id=@id
exec usp_Del 1007
sql procedure
select * from employee
create proc pro_update2
@id int,
@salary money
as
update employee1
set salary=@salary
where id=@id
exec pro_update2 1,8500
select * from employee1

alter proc USP_Select6
@id int,
@name varchar(20),
@salary money,
@comm money
as
insert into employee1 values (@id,
@name,
@salary,
@comm
)
exec USP_Select6 3,'Ramesh',12500,250
select * from employee1

create procedure insert1
@rno int,
@name varchar(20),
@gender varchar(10),
@city varchar(10),
@msg varchar(20)
as
insert into stud(rno,sname,gender,city,msg) values(@rno,@name,@gender,@city,@msg)


select * from stud
execute insert1 102,'Sunil','Male','JAP','Well Done'


No comments:

Post a Comment

JAC Board Computer || IIT 2025 || Introductory Information Technology || Class 10 || Practical Examination 2025

Marks Division HOE 30 Marks IT Application Report File 20 Marks Viva - Voce 10 Marks 1) Write an HTML code to generate a web p...