觸發器中需要Into子句 declare msg varchar2(20); begin select msg_content into msg from (select msg_content from dssq_msg where type='xh') t where rownum<=1; end;
漏了order by語句: declare msg varchar2(20); begin select msg_content into msg from (select msg_content from dssq_msg where type='xh' order by dbms_random.value) where rownum<=1; end;
谢谢tommysun哥哥,我先试一下
to tommysun: 帮忙看一下,这句话怎么写呀declare msg varchar2(20); begin select msg_content+'回复2看下一条' into msg from (select msg_content from dssq_msg where type='xh' order by dbms_random.value) where rownum<=1; end;
是要连接字符串么?是的话就用|| msg_content||'回复2看下一条'
declare msg varchar2(20); begin select msg_content || '回复2看下一条' into msg from (select msg_content from dssq_msg where type='xh' order by dbms_random.value) where rownum<=1; end;
declare
msg varchar2(20);
begin
select msg_content into msg from (select msg_content from dssq_msg where type='xh') t where rownum<=1;
end;
declare
msg varchar2(20);
begin
select msg_content into msg from (select msg_content from dssq_msg where type='xh'
order by dbms_random.value) where rownum<=1;
end;
帮忙看一下,这句话怎么写呀declare
msg varchar2(20);
begin
select msg_content+'回复2看下一条' into msg from (select msg_content from dssq_msg where type='xh'
order by dbms_random.value) where rownum<=1;
end;
msg_content||'回复2看下一条'
msg varchar2(20);
begin
select msg_content || '回复2看下一条' into msg from (select msg_content from dssq_msg where type='xh'
order by dbms_random.value) where rownum<=1;
end;