Oracle SQL bug in

From: DG problem <>
Date: Wed, 9 Feb 2011 16:06:11 -0800 (PST)
Message-ID: <>

I've only just come across this possible SQL bug and was wondering why this SQL returns a result? I got it through an email and had to change it to Oracle's syntax as the original used the concat operator of + and it didn't use DUAL.
  • Note the spaces after 'WHY ' select '<'||Y||'>', Y from ( select 'WHY ' Y from dual) x where Y = 'WHY' ;

P.S. Yes I know that 9i is well and truly obsolete :) Received on Wed Feb 09 2011 - 18:06:11 CST

Original text of this message