使用select语句给一个变量赋值:
SELECT
parent_id INTO sParentId
FROM
t_knowledge_catalog
WHERE
catalog_id = sChildId;
那如果还有一个变量sPathName,改如何赋值呢?下面这样写保存函数的时候报错
SELECT
parent_id INTO sParentId, catalog_name INTO sPathName
FROM
t_knowledge_catalog
WHERE
catalog_id = sChildId;
报错:
undeclared variable:catalog_name
select 列名1,列名2...列名N into 参数1,参数2...参数N