Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Two Hyphens in SQL

448221May 22 2006 — edited May 22 2006
Quite often, I see example SQL from books (Mastering Oracle SQL from Orielly and Oracle SQL High Performance Tuning) having 2 hyphens in it (--) as minus operator , e.g.:

SELECT .. FROM t WHERE order_dt > SYSDATE -- 100*4;

I tested it with Oracle 9iR2 and it doesn't look like a valid syntax (a single hyphen should be the corrent syntax). I just wondering if this is some old syntax? I think it is unlikely that 2 books make the same error!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 19 2006
Added on May 22 2006
1 comment
1,444 views