I open a connection to my schema and I want to view a table.
Why does this work by itself:
select * from mytable;
But this does not:
-- other statements above
begin
insert into mytable(id, name) values (2, "George");
exception ...
end;
select * from mytable;
This returns nothing. No query output is given. Instead all I see is “Task completed in 0.016 seconds”.
If I restart sqldeveloper and run ONLY the begin/end and the select statements, I get this error thrown at me:
Error report:
ORA-06550: line 7, column 1:
PLS-00103: Encountered the symbol "SELECT"
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
I suppose you are trying to run those commands as a script(pressing
F5) in a SqlDeveloper. Then there are a couple of things:1) Replace double quotes by single quotes in the insert statement.
2) Put slash
/at the end of the PL/SQL block.do not forget commit.