【发布时间】:2020-09-14 05:29:44
【问题描述】:
我正在尝试在 MySQL workbench/j 中测试我的存储过程。尝试调用存储过程时出现错误。
我创建了一个表来存储我的存储过程的结果
CREATE TABLE IF NOT EXISTS ableok
(
name VARCHAR(50) ENCODE lzo
);
这是我的存储过程:
CREATE OR REPLACE PROCEDURE sp_GetDistSchema()
AS '
BEGIN
SELECT table_schema INTO ableok FROM information_schema.tables;
END;
'
LANGUAGE plpgsql;
这就是我在 SQL workbench/j 中调用我的存储过程的方式:
call sp_getdistschema();
结果:
An error occurred when executing the SQL command:
call sp_getdistschema()
[Amazon](500310) Invalid operation: Column "table_schema" has unsupported type "information_schema.sql_identifier".; [SQL State=0A000, DB Errorcode=500310]
1 statement failed.
【问题讨论】:
标签: sql amazon-web-services stored-procedures amazon-redshift plpgsql