Untitled

mail@pastecode.io avatar
unknown
plain_text
24 days ago
1.5 kB
11
Indexable
Never
08/02/2024
_______________________________________________________________________________________________________-
store procedure:
_________________________--

parametes:
1. In:-
2. out:-
3. INOUT:-

1. In:- input from user:


 delimiter //
mysql> create procedure selectmangerdetails(IN Manager_name varchar(255))
    -> begin
    -> select * from manager1 where mname=Manager_name;
    -> end //

call procedure:
call selectmangerdetails("siva")


2. out:-
mysql> create procedure countbyselect(IN Manager_name varchar(255), OUT total int)
    -> begin
    -> select count(*) into total from manager1 where  mname=Manager_name;
    -> end //

call store procedure:-
call countbyselect("neha",@countman);
select @countman;


________________________________________________________________________________________________________________________________________________-

drop procedure;
syntax:- drop procedure proce_name;
exa:
delimiter ;
Drop procedure countemp;

____________________________________________________________________________________________________________________________________________-
listing store procedure:

show procedure status where db="first";

_________________________________________________________________________________________________________________________________________________
=====================================================================================================================================================


Leave a Comment