1

What do the following mean in an sql sytax:

  1. (+) after a condition eg: "WHERE table1.col1 = table2.col2 (+)

  2. 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 /* */ ...

1
  • Sorry about all the edits it seems 2 of us tried to edit at the same time. Commented Jan 13, 2009 at 23:31

3 Answers 3

8
  1. The (+) means an outer join syntax for SQL on Oracle.

  2. 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*/

Sign up to request clarification or add additional context in comments.

1 Comment

ah yes, those are hints. I can google for further reference. Thanks
2

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.

Comments

2

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 hints

2 Comments

I tried editing to add the inline-code backticks. Does that make it do what you want?
Close, was trtying to get the rem hint in italics /*+ hint */

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.