Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- mi metedo de programar el ejersicio
- BEGIN
- FOR counter IN 1 .. 10 LOOP
- continue WHEN counter = 6
- OR counter = 8;
- DBMS_OUTPUT.put_line(counter);
- INSERT INTO messages (results)
- VALUES (counter);
- END LOOP;
- COMMIT;
- END;
- /
- -- la solucion que viene en libro
- BEGIN
- FOR i IN 1..10 LOOP
- IF i = 6 OR i = 8 THEN
- NULL;
- ELSE
- INSERT INTO mess(results)
- VALUES (i);
- END IF;
- END LOOP;
- COMMIT;
- END;
- /
- -- aparte he creado la tabla
- CREATE TABLE mess AS dual;
- SELECT * FROM mess;
- -- el error que da
- Error report -
- ORA-06550: line 6, column 14:
- PL/SQL: ORA-00942: TABLE OR VIEW does NOT exist
- ORA-06550: line 6, column 2:
- PL/SQL: SQL Statement ignored
- 06550. 00000 - "line %s, column %s:\n%s"
- *Cause: Usually a PL/SQL compilation error.
- *Action:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement