怎么修改下面这个存储过程
怎么修改下面这个存储过程
create proc p_chk
(n1 int,
n2 int,
out ifCanInsert int
)
if exists(select 1 from t where n1 between number1 and number2 or
n2 between number1 and number2 )
set ifCanInsert =0
else
set ifCanInsert =1
//
出现错误为
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'proc
p_chk
(n1 int,
n2 int,
out ifCanInsert int
)
if exists(select 1 from t wher' at line 1