Popular Post

Posted by : Murat PINAR 17 Şubat 2015 Salı

BEGIN
DECLARE DEG VARCHAR(20);
BEGIN
  DEG:=TO_CHAR(SYSDATE,'DAY');

  IF DEG IN('SUNDAY','SATURDAY') THEN
    DBMS_OUTPUT.PUT_LINE('HAFTA SONU');
  ELSIF DEG='MONDAY' THEN DBMS_OUTPUT.PUT_LINE('HAFTA BAŞI');
  ELSE DBMS_OUTPUT.PUT_LINE('HAFTA ICI LYANN');
  END IF;
  END;


 -----------------------
 DECLARE GUN VARCHAR(20);
 BEGIN
      GUN:=TO_CHAR(SYSDATE,'DAY');
 
    CASE GUN WHEN 'SUNDAY' THEN DBMS_OUTPUT.PUT_LINE('YOKUM');
             WHEN 'SATURDAY' THEN DBMS_OUTPUT.PUT_LINE('YOKUM2');
             WHEN 'MONDAY' THEN DBMS_OUTPUT.put_line('GEL');
         ELSE DBMS_OUTPUT.put_line('NEY NEY NEY');
     END CASE;
 END;

-----------------------
 DECLARE
SAY NUMBER(2):=1;
BEGIN
  LOOP
    EXIT WHEN SAY>=10;
    DBMS_OUTPUT.put_line('DEGER: '||SAY);
    SAY:=SAY+1;
    END LOOP;
END;
-----------------------
DECLARE
DEG NUMBER(2):=1;
BEGIN
  WHILE DEG<=9 LOOP
   DBMS_OUTPUT.PUT_LINE('SAYI: '||DEG);
      DEG:=DEG+1;
  END LOOP;
END;
-----------------------
DECLARE
SAY NUMBER(2);
BEGIN
  FOR say IN REVERSE 1..10
    LOOP
      DBMS_OUTPUT.PUT_LINE('RAKAM: '||SAY);
    END LOOP;
 END;

Copyright © Murat PINAR - Modified By - Designed by