Separation of statements in TOAD
I am a long time SQL Server users and am VERY new to Oracle.
In SQL Server, I can do the following
DROP TABLE Blah; CREATE TABLE Blah(yada int);
When I run a similar statement in Oracle, the DROP always runs fine but the Create dosn't get touched unless I highlight that line specifically.
I tried putting / between the lines and that didn't help.
Can anyone tell this newb what he is doing incorr开发者_开发问答ectly?
Thanks!
In TOAD you can run the current line in the editor as a single statment, or run the entire contents of the editory as a script. If your current line has more than one statment, on the the first gets executed if you are executing statement
shift-F9 runs the current statement f5 runs the entire contents.
Note that if the current statement is a pl/sql block - then the entire blockl will get executed with the execute statement, so if you put a begin..end around your two statements then they could be run as a unit without running the rest of whatever is on the editor. Note also that the execute statement is also intolerant of blank lines. IT will run a multi-line statment, but not if there are any blank lines in it.
Put it in a new line. And use execute as a script feature of TOAD.
F5 is the shortcut for doing that.
精彩评论