Documente Academic
Documente Profesional
Documente Cultură
Begin
Statements;
End $$
Begin
End$$
Begin
Set x =20;
Set y=30;
Set z = x+y;
Select z;
End $$
Begin
Set @c = a+b;
End $$
Set @c=0;
Call global() $$
Select @c $$
Nested Begin
Begin
Select a,b;
Begin
Select a,b;
End$$
End $$
Types of Parameter
1) IN
2) OUT
3) INOUT
Begin
End$$
Call parameter(10000) $$
Begin
End $$
Call my_proc_parameterout(@output)
Select @output $$
Q. create a procedure that find max,min,avg & sum of salary from employee table
Begin
If input=1 then
Endif;
Call my_proc_func(2,@output) $$
Select @output $$
2. Case
Statement
When(condt) then
Statement
Else
Statement
End case;
Loop Statement
Loop_label: LOOP
Statements;
Statements;
Begin
Open cursor_test;
Loop_begin: loop
If flag =1 then
Leave loop_begin;
End if;
End loop;
End $$