1. An update and delete can kill a large chunk of people because everyone thinks this sentence is very well written, not just:
Update table set a=x,b=y;
Delete from table where name=xx
Of course, now I talk about this problem, we certainly disagree, so simple, who will not ah, in fact, I also think so (in the absence of this problem before), so simple SQL, beginners will, how I may not, open any joke! Because of this problem, I can not calm a few hours, you know as an employee, suddenly out of the wrong but do not know how to remedy the mood, so we have to remember, after laughing remember to do any operation should be careful ah, must be careful ah!
2.pl/sql We always wonder why my single SQL executes well, but when I execute a piece is a mistake, from our logical thinking, there is really no problem, I think so, although I believe that Oracle will not make such a problem, but also do not doubt their IQ, Then in that tangled it, tangled it, and then find two people a tangled it, the good partner also the whole infinite tangled, in the end should do? In fact, it's hard for you to think of killing you, not at home and abroad. Speaking of which, you may not understand, but ASCII as a computer professional you must know, the Chinese state of ASCII and English ASCII how can it be the same? Who has made our ancestors incapable of creating such a great product? So the English state is very important ah, do not know to delete extra space or newline!
3.oracle error is very wonderful, not all the errors will certainly conform to the specifications, sometimes you see the error you must understand his Chinese meaning, so easy, but half a day you can not find any problems, the following for everyone to see a sql:
Delete from T_ds_tunnel_logic_info t where T.physic_tunnel_no in
(select P.physic_tunnel_no from T_ds_tunnel_physic_info p where rownum <=3 order by p.physic_tunnel_no DESC);
Let's take a look at his error:
Ora-00907:missing Right Parenthesis
Is it missing the closing parenthesis? Oh, such a simple place still use me to teach you, that is certainly not so stupid problem. To say the question: because this is nested in a subquery, it is not allowed to nest the order by directly, although this is also a top-n subquery. The general order by only works in the Top-n subquery, but this subquery is as a result set, if you don't understand the blog
[Oracle] RowNum and selects the first n-sorted data, which is very good.
Common Oracle Errors