orcale怎么在查询语句里面定义变量
我想在写查询语句的时候,将条件赋给变量,不知道怎么写,
SQL的话,比如:
declare @temp varchar(20)
set @temp='SRT13000007'
select * from einvgtfhd where efhno=@temp
但我不知道orcale怎么写
[解决办法]
declare temp varchar(20);
begin
temp:='SRT13000007';
//--select * from einvgtfhd where efhno=temp;
ORACLE不支持这种查询,这样的查询必需有游标。
end;