组合查询 比如我有5个查询条件,但 我可能用到其中的两个或者三个,总之就是查询条件的数量不定,怎么查询? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 动态sql· 拼接字符串 动态的SQl语句拼接字符串可以实现的 --类似这样的...strsql := 'select count(*) from table where 1=1 ';if a <> '' then strsql := strsql || 'and col1 =' || a || ''' ';end if; if b <> '' then strsql := strsql || 'and col2 =' || b || ''' '; end if;...execute immediate strsql into v_num;... 求这个sql语句怎么写! 简单SQL问题,向高手们请教下! oracle 字符串替换 问题 求几个建表的维度,设计思路oracle 怎么去oracle中最后10条数据 关于事务级的临时表,取不到数据问题,进来看看 如何在ORACLE中实现类似SQLSERVER中的自增ID的字段? 在oracle8.1.7中插入图片的详细办法! SQL语句求number(10,2)列的和,在线等!!! 关于时间函数的问题!! 多个分组 该如何做? 连接Oracle数据库问题
--类似这样的
...
strsql := 'select count(*) from table where 1=1 ';if a <> '' then
strsql := strsql || 'and col1 =' || a || ''' ';
end if;
if b <> '' then
strsql := strsql || 'and col2 =' || b || ''' ';
end if;
...execute immediate strsql into v_num;
...