报错[Err] 1064 - 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 'mysql> delimiter
这
是
源
代
码
:
m
y
s
q
l
>
d
e
l
i
m
i
t
e
r
这是源代码: mysql> delimiter
这是源代码:mysql>delimiter
mysql> create procedure teachernfo1(in teacherid int(10),in type int(10),out info)
-> begin
-> if type=1 then select name into info from teacherinfo where num=teacherid;
-> else if type=2 then select (datediff(now(),birthday)/365)from teacherinfo where num=teacherid;
-> else set info=‘Error’;
-> end
m
y
s
q
l
>
d
e
l
i
m
i
t
e
r
;
为
什
么
报
错
[
E
r
r
]
1064
−
Y
o
u
h
a
v
e
a
n
e
r
r
o
r
i
n
y
o
u
r
S
Q
L
s
y
n
t
a
x
;
c
h
e
c
k
t
h
e
m
a
n
u
a
l
t
h
a
t
c
o
r
r
e
s
p
o
n
d
s
t
o
y
o
u
r
M
y
S
Q
L
s
e
r
v
e
r
v
e
r
s
i
o
n
f
o
r
t
h
e
r
i
g
h
t
s
y
n
t
a
x
t
o
u
s
e
n
e
a
r
′
m
y
s
q
l
>
d
e
l
i
m
i
t
e
r
mysql> delimiter; 为什么报错[Err] 1064 - 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 'mysql> delimiter
mysql>delimiter;为什么报错[Err]1064−YouhaveanerrorinyourSQLsyntax;checkthemanualthatcorrespondstoyourMySQLserverversionfortherightsyntaxtousenear′mysql>delimiter
那位大佬看看吧,谢谢了!!