Thursday, September 29, 2011

mysql function example

delimiter //
create function mytest () returns char(50) deterministic
begin
declare c int;
select count(*) into c from table;
return c;
end
//
delimiter ;