Two Hyphens in SQL
448221May 22 2006 — edited May 22 2006Quite 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!