[SQL ] mysql 的語法問題
[begin_label:] BEGIN
[statement_list]
END [end_label]
BEGIN ... END syntax is used for writing compound statements,
which can appear within stored programs.
A compound statement can contain multiple statements,
enclosed by the BEGIN and END keywords.
statement_list represents a list of one or more statements,
each terminated by a semicolon (;) statement delimiter.
statement_list is optional,
which means that the empty compound statement (BEGIN END) is legal.
mysql> delimiter ;
mysql> begin end;
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 'end' at line 1
mysql> delimiter //
mysql> begin end;//
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 'end' at line 1
mysql> begin end//
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 'end' at line 1
上面英文的說明抄自mysql的官網,
可是我怎樣寫都是錯誤,問題在那?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 71.198.44.240