today:
457
yesterday:
719
Total:
1,770,241

Technology

LOOP -1

admin 2018.12.09 22:13 Views : 306

DECLARE 

 

CUSTOMER_NAME VARCHAR2(100);

CUSTOMER_EMAIL VARCHAR2(100);

CUSTOMERNAME VARCHAR2(100);

CUSTOMEREMAIL VARCHAR2(100);

 

EMAIL_LIST VARCHAR2(100);

EMAIL_COUNT NUMBER;

 

BEGIN

 

 SELECT COUNT(*) INTO EMAIL_COUNT FROM CUSTOMERS; 

 FOR i IN 1..EMAIL_COUNT 

 

LOOP 

  SELECT  CUSTOMER_NAME into CUSTOMERNAME FROM CUSTOMERS WHERE ID = i;

  SELECT  CUSTOMER_EMAIL into CUSTOMEREMAIL FROM CUSTOMERS WHERE ID = i;

  DBMS_OUTPUT.PUT_LINE ( CUSTOMERNAME || CUSTOMEREMAIL );

 

END LOOP;

 

END;