I have a set of SQL statements that I would like to execute to run a test
create table t2 (x varchar2 (1), y int, z date, constraint pk_t2 primary key (y, z) );
insert into t2 values ('a', 111, sysdate );
DBMS_OUTPUT.put_line('Time 1: ');
-- Pause for 1 second.
sys.DBMS_SESSION.sleep(1);
insert into t2 values ('a', 111, sysdate );
DBMS_OUTPUT.put_line('Time 2: ');
-- Pause for 1 second.
sys.DBMS_SESSION.sleep(1);
insert into t2 values ('a', 111, sysdate );
DBMS_OUTPUT.put_line('Time 3: ' || TO_CHAR(SYSTIMESTAMP, 'HH24:MI:SS.FF'));
-- Pause for 1 second.
sys.DBMS_SESSION.sleep(1);
insert into t2 values ('a', 111, sysdate );
DBMS_OUTPUT.put_line('Final: ' || TO_CHAR(SYSTIMESTAMP, 'HH24:MI:SS.FF'));
drop table t2;
If I select this set of statements in SQL Developer and click on 'RUN' I get errors like:
Error starting at line : 8 in command -
sys.DBMS_SESSION.sleep(1)
Error report -
Unknown Command
Do I have a syntax problem or a basic misunderstanding of how to run SQL commands in SQL Developer Studio?