oracle中怎么select出一个值赋给变量,然后另一句话使用该变量

2024-11-15 07:41:46
推荐回答(1个)
回答1:

pl/sql编程可以
declare
v_name varchar(20);

begin
select name into v_name from student where id=2;

select * from student where name=v_name;

end;