我试图存储这一天,然后在 if 语句中使用它,但它不起作用....
它跳过如果全部
select TO_CHAR(sysdate, 'DAY') into v_today from dual ; // save the day to v_today
if v_today <> 'SUNDAY' or v_today <> 'SATURDAY'// check for the vlaue of v_today
then
DBMS_OUTPUT.PUT_LINE('the office is open') ;
else
DBMS_OUTPUT.PUT_LINE('the office is close of the weekend') ;
end if;