Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Plsql MariaDB pl/sql“函数不存在”_Plsql_Innodb_Mariadb 10.5 - Fatal编程技术网

Plsql MariaDB pl/sql“函数不存在”

Plsql MariaDB pl/sql“函数不存在”,plsql,innodb,mariadb-10.5,Plsql,Innodb,Mariadb 10.5,我在InnoDB 10.5.6中使用MariaDB 10.5.6-MariaDB,每次我尝试在pl/sql块中执行select或其他操作时,它都会说“函数不存在”。我做错了什么?在pl/sql可以使用之前,是否有一个库需要来源?这毫无意义 它在begin/end之外独立工作,我得到的结果是:94 select count(1) from information_schema.all_plugins; 这行不通 错误: Error starting at line : 1 in command

我在InnoDB 10.5.6中使用MariaDB 10.5.6-MariaDB,每次我尝试在pl/sql块中执行select或其他操作时,它都会说“函数不存在”。我做错了什么?在pl/sql可以使用之前,是否有一个库需要来源?这毫无意义

它在begin/end之外独立工作,我得到的结果是:94

select count(1) from information_schema.all_plugins;
这行不通

错误:

Error starting at line : 1 in command -
BEGIN
    select count(1) from information_schema.all_plugins;
END;
Error report -
FUNCTION count does not exist
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
Error starting at line : 1 in command -
BEGIN
    select 'hello world';
END;
Error report -
FUNCTION 'hello does not exist
这两者都不起作用:

错误:

Error starting at line : 1 in command -
BEGIN
    select count(1) from information_schema.all_plugins;
END;
Error report -
FUNCTION count does not exist
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
Error starting at line : 1 in command -
BEGIN
    select 'hello world';
END;
Error report -
FUNCTION 'hello does not exist
这也不行

错误:

Error starting at line : 1 in command -
BEGIN
    select count(1) from information_schema.all_plugins;
END;
Error report -
FUNCTION count does not exist
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
Error starting at line : 1 in command -
BEGIN
    select 'hello world';
END;
Error report -
FUNCTION 'hello does not exist
和来自CLI客户端的


您试图实际使用的数据库是什么?你说的是plsql,但那不是一个数据库,它是Oracle数据库的一种缓和语言。您的代码块似乎支持这一点,但select不会在块外运行。Oracle中不存在信息\u架构。也许您想要Postgres,但是代码块的格式不正确。其次,为什么您希望MariaDB函数在任何其他数据库中工作,您在文档中的何处找到它?比如@Belayer,我想知道PL/SQL与MariaDB有什么关系。如问题的第一行所示,该数据库是MariaDB 10.5.6-MariaDB。我在oracle数据库方面有经验,这些代码和匿名块在那里经常被称为aka PL/SQL。如果MariaDB对同一个概念有不同的名称,那么我很抱歉,但我没有意识到这一点,但问题是相同的:这些匿名块有什么问题,为什么不能将行数分配给变量?除了行数之外,文档还提到MariaDB中的dbms_输出等价物类似于Select hello world;在匿名区。因此,逻辑规定选择count1。。。;还应该写入与MariaDB等效的dbms_输出,这将有助于编写类似于PL/SQL的东西,例如匿名块。但是,不幸的是,正如我在问题中提到的,hello world也不适合我。MariaDB没有任何类似于PL/SQL的匿名块,因此任何尝试使这种模拟工作都注定要失败。Oracle和MariaDB是不同的数据库系统,您似乎低估了它们的不同。