images may not be visible correctly
copy below statement as it as.. (line break after '--')
--result = '3 -7'
Using SQL developer 20.2 version (happens in all other older versions also), getting strange results with below statement. Any explanation?
"below statement"? there is no statement or results in your post so who knows...
copy/paste the text. Don;t bother with pictures of your screen,
1 person found this helpful
Apologies, you included some statements in your second post, not sure how I missed that...
Anyway the "workaround" is to actually use the -- for actual comments, not just "for fun". sqldev is interpreting the -- as minus so no wonder you get undesirable results. Incidently the same behavior can be observed in sqlplus. I would say this is NOT a bug, just a misuse on your part with the two minuses.
If you really want an "empty" comment after the select keyword then consider using the C/C++ style /* */ syntax.
thanks for your help,
it was accidental discovery, i intended to add comment after '--' (line comment) but ran before that only.