我想用游标写一个程序,这将让病人第一次免费看医生(现在没有任何探视,但我不知道什么更容易
有什么暗示怎么做吗?
下面是我的桌子结构。如果你认为我的例子对程序和功能不好,你可以给我一个不同的例子(因为它必须通过任何与我的医疗中心相关的程序)。
我有四张桌子
F 215
发布于 2010-02-22 20:18:49
像这样吗?
create or replace procedure sho_doc(p_hour in varchar2)
is
cursor get_free_time_cur
is
select doctor_name
from doctor_table
where status = 'FREE'
and slot = p_hour_in;
begin
for idx in get_free_time_cur
loop
//Do some thing here
end loop
end;
我假设你在使用Oracle。我不知道桌子的结构。所以,只是假设一些事情。
https://stackoverflow.com/questions/2313812
复制相似问题