Mac的OS X平台,建立function时提示 ERROR 1366 (HY000)和 E RROR 1054 (42S22),请问如何解决?
Mac的OS X平台,建立function时提示 ERROR 1366 (HY000)和 E RROR 1054 (42S22),请问如何解决?感激不尽~
mysql> CREATE FUNCTION f2(num1 SMALLINT UNSIGNED,num2 SMALLINT UNSIGNED)
-> RETURNS FLOAT(10,2) UNSIGNED
-> RETURN (num1+unm2)/2;
Query OK, 0 rows affected (0.01 sec)
mysql> SELECT F2(10,16);
ERROR 1054 (42S22): Unknown column 'unm2' in 'field list'
mysql> CREATE FUNCTION f1() RETURNS VARCHAR(30) RETURN DATE_FORMAT(NOW(),'%Y年%m月%d日 %H时:%i分:%s秒');
Query OK, 0 rows affected, 2 warnings (0.01 sec)
mysql> SELECT f1();
ERROR 1366 (HY000): Incorrect string value: '\xE5\xB9\xB405\xE6...' for column 'f1()' at row 1