Work/database

웅s 2009. 2. 10. 19:29

SET GLOBAL log_bin_trust_function_creators = 1;

 

delimiter //
CREATE FUNCTION test_function1
 (name VARCHAR(20), id INT) RETURNS DOUBLE
 BEGIN
  DECLARE point DOUBLE;
  SELECT count(1) INTO bonus FROM point;

  SET point = point * 100;
  return (bonus);
 END; //
delimiter ;