www.rdpz.net > orAClE iF ElsE

orAClE iF ElsE

set serveroutput on declare cj number; begin select avg(成绩字段) into cj from table_name; if cj > 75 then dbms_output.put_line('平均成绩>75'); else dbms_output.put_line('平均成绩

没有!!!!

if( a==1 && b==1) 这样写: if a = 1 and b = 1 then -- 里面写if成立情况的代码 else -- else情况 end if; if(a==1 | | b==1) 这样写: if a = 1 or b = 1 then -- 里面写if成立情况的代码 else -- else情况 end if;

create or replace procedure p_run_temp as S_DATE:=to_number(to_char(sysdate,'d'),'9');--查询下to_char这个函数是否有问题 begin if S_date=4 then p_temp(); else p_temp2(); end if ; end p_run_temp; 存储过程一般用AS。而且题中的存储...

create or replace view CallMark as select id, (case score when '优' then '90' when '中' then '75' when '差' then '30' else score end) as U_score from mark

if (a > 0) and b < 0 then ...else ...end if;

oracle存储过程中的if条件判断的写法: 比如: temp varchar2(10) := '10000'; if temp '10000' then insert into ... else update ....... end if;

加一行 NULL 即可 例如: SQL> DECLARE 2 testvalue INT; 3 BEGIN 4 testvalue := 200; 5 6 IF testvalue > 100 THEN 7 8 ELSIF testvalue = 100 THEN 9 dbms_output.put_line( '100' ); 10 ELSE 11 dbms_output.put_line( '100-' ); 12 END IF;...

select age,name,sex from student where sex = (case when age=15 then '男' end)

select case when job = 'CLERK' then '雇员' else '其他' end from emp;

网站地图

All rights reserved Powered by www.rdpz.net

copyright ©right 2010-2021。
www.rdpz.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com