How to insert records into variables from cte in oracle?
问题 I have a procedure in which I want to fetch all records from cte into Names variable. But this code is not writing into names from CTE. How can I fetch records into names so that I can later loop through names and get content of field_name? CREATE OR REPLACE PROCEDURE sp_market IS Names VARCHAR2(32767); BEGIN WITH CTE(sqql) As ( SELECT field_name sqql FROM pld_medicare_config ) SELECT sqql into Names from CTE; END sp_market; 回答1: SELECT sqql into Names from CTE; You are assigning multiple