type gcursor is rel of cursor;
procedure aa()
as
str varchar2(2000);
begin
if country<>"" and name<>"" and sex<>"" then
str='select * from table where country='''||country||''' and name='''||name||'''
and sex='''||sex||''''
end if;
......判断open rs for str;
end aa;
procedure aa()
as
str varchar2(2000);
begin
if country<>"" and name<>"" and sex<>"" then
str='select * from table where country='''||country||''' and name='''||name||'''
and sex='''||sex||''''
end if;
......判断open rs for str;
end aa;
解决方案 »
- SQLserver 中游标while循环中的continue在oracle中怎么用
- date(+)=to_date('20090805','yyyymmdd')
- Oracle 查询问题
- 简单的游标问题
- 在SQL2000 中的这个存储过程在Oracle9i如何写??????????在线等待!!!!!!!!!!!!!!!!!!!!!
- 安装多个CLIENT的问题
- 这么简单的一句,还提示错误,真糊涂,大家看看是什么原因?在线等!!!!!!!
- oracle的建库
- 求数据库的大神看看 菜鸟在这跪求了!!
- OracleDBConsoleorcl服务启动不了
- 出错:: ORA-01461: 仅可以为插入 LONG 列的 LONG 值赋值. 为什么?
- 在pro*c中,无法在表中插入中文,但在sqlplus工具中能插入中文???
procedure aa(i_ct varchar2, i_na varchar2, i_se varchar2, rs out gcursor)
as
begin
open rs for select * from table where (i_ct is null or country=i_ct)
and (i_na is null or name=i_na) and (i_se is null or sex=i_se);
end aa;