是否可以将 select 语句定义为变量,如下所示:
定义(选择t1.id,t1.var1,t1.var2,t2.id,t2.var1,t2.var2来自 table1 t1,table2 t2 where t1.id = t2.id)as namevariable
感谢您的帮助, 安德烈
答案 0 :(得分:1)
定义(选择t1.id,t1.var1,t1.var2,t2.id,t2.var1,t2.var2来自 table1 t1,table2 t2 where t1.id = t2.id)as namevariable
你可以这样做:
{{1}}
答案 1 :(得分:0)
只需选择...进入...
DECLARE
my_id NUMBER;
my_val VARCHAR2(32);
BEGIN
SELECT t1.id, t1.val into my_id, my_val from my_table t1 where... ;
END;