MySQL basis (3) | function

MySQL basis (3) | function


Foreword

MySQL only scalar-valued function of the concept, not the kind of SqlServer table-valued function.

grammar

  1. create
create function f_add(
    a int,
    b int
)
returns int
return 
    (select a + b);
    
select f_add(1, 2);
  1. modify
alter function f_add()...
  1. delete
DROP FUNCTION [ IF EXISTS ] <自定义函数名>

Reference: http://c.biancheng.net/view/2590.html

Guess you like

Origin www.cnblogs.com/iwsx/p/12348937.html