--当天空气质量最好的城市
select max(tt.oper_date) into l_currentDay from city_day tt;
select t.city
into l_airBestCity
from city_day t
where t.oper_date = l_currentDay
and t.pollution_indeces =
(select min(ttt.pollution_indeces)
from city_day ttt
where ttt.oper_date = l_currentDay);
但是有问题,因为
select t.city
from city_day t
where t.oper_date = l_currentDay
and t.pollution_indeces =
(select min(ttt.pollution_indeces)
from city_day ttt
where ttt.oper_date = l_currentDay);
查出来有可能有多条数据,所以想用不定长度数组来存放查出的数据。
或者用别的方式,只要能实现就行。哪位能给我一个示例代码?
select max(tt.oper_date) into l_currentDay from city_day tt;
select t.city
into l_airBestCity
from city_day t
where t.oper_date = l_currentDay
and t.pollution_indeces =
(select min(ttt.pollution_indeces)
from city_day ttt
where ttt.oper_date = l_currentDay);
但是有问题,因为
select t.city
from city_day t
where t.oper_date = l_currentDay
and t.pollution_indeces =
(select min(ttt.pollution_indeces)
from city_day ttt
where ttt.oper_date = l_currentDay);
查出来有可能有多条数据,所以想用不定长度数组来存放查出的数据。
或者用别的方式,只要能实现就行。哪位能给我一个示例代码?
楼主【suncheng_hong】截止到2008-06-25 20:56:44的历史汇总数据(不包括此帖):
发帖数:83 发帖分:3470
结贴数:67 结贴分:2850
未结数:16 未结分:620
结贴率:80.72 % 结分率:82.13 %
楼主加油
原来没用过, 帮你查到的
type arr is varray(20) of integer;
a arr;
lz是想问这个吗?