我每次尝试在 pl/sql 块中进行选择或任何操作时都使用MariaDB 10.5.6-MariaDB
with ,然后它会显示“函数不存在”。InnoDB 10.5.6
我究竟做错了什么?在使用 pl/sql 之前是否需要获取库?这是没有意义的。
这有效(在开始/结束之外),我得到了结果:94
select count(1) from information_schema.all_plugins;
这不起作用
BEGIN
select count(1) from information_schema.all_plugins;
END;
/
错误:
Error starting at line : 1 in command -
BEGIN
select count(1) from information_schema.all_plugins;
END;
Error report -
FUNCTION count does not exist
这都不起作用:
BEGIN
declare rowCount decimal;
select count(1) into @rowCount from information_schema.all_plugins;
END;
/
错误:
Error starting at line : 1 in command -
BEGIN
declare rowCount decimal;
select count(1) into @rowCount from information_schema.all_plugins;
END;
Error report -
FUNCTION count does not exist
这也不起作用
BEGIN
select 'hello world';
END;
/
错误:
Error starting at line : 1 in command -
BEGIN
select 'hello world';
END;
Error report -
FUNCTION 'hello does not exist
从 CLI 客户端
MariaDB [(none)]> delimiter //
MariaDB [(none)]> begin
-> select 'hello';
-> end;
-> //
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select 'hello';
end' at line 2
MariaDB [(none)]> begin
-> select "hello";
-> end;
-> //
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select "hello";
end' at line 2
MariaDB [(none)]> begin
-> select 'hello';
-> end
-> //
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select 'hello';
end' at line 2
MariaDB [(none)]> begin
-> select "hello";
-> end
-> //
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'select "hello";
end' at line 2