What do the following mean in an sql sytax:
(+) after a condition eg: "WHERE table1.col1 = table2.col2 (+)
What does /* */ after select signify , i vaguely remember it being a suggestion to the optimizer, but where can i find more reference on this eg: select /* */ ...
-
The
(+)
means an outer join syntax for SQL on Oracle.The
/*
alter the SELECT means a comment. In Oracle if the comments starts with/*+
(A plus after the comment token, means a hint, for instance/*+ORDERED*/
-
If we are talking oracle then the
(+)
is an outer join and/* some stuff */
is a comment. If the comment is of the form/*+ hint* */
then the comment is probably a hint. google on oracle hintsstjohnroe : The formatting stuff escapes meBill Karwin : I tried editing to add the inline-code backticks. Does that make it do what you want?stjohnroe : Close, was trtying to get the rem hint in italics /*+ hint */ -
By the way, a lot of business intelligence is stealth in SQL queries - and most queries, as long as they can be, do not have comments at all !
This is a shame :o)
Adding /* */ comments in a query should be done every time the query is not obvious. That is to say, most of the time...
A+ Sylvain.
0 comments:
Post a Comment