Re: SUMMARY: SQL question

From: Doug Harris <ah513_at_FreeNet.Carleton.CA>
Date: Wed, 29 Dec 1993 22:35:11 GMT
Message-ID: <CItIqo.CBy_at_freenet.carleton.ca>


In a previous article, davidmo_at_rossinc.com (David Moore) says:

>The reason I asked the question was that when I use SQL with RDB on VMS and
>Ingres on Unix, the following statements always give the same results:
>
>SQL> select count(*) from table_one where field_one = '';
>
>SQL> select count(*) from table_one where field_one = ' ';
>
>I guess this means that RDB and Ingres are incorrect!?! :-)
>

   If you are using Oracle7 and field_one is of type CHAR(n) then the two queries will return the same result. This is in conformance with one of the ANSI standards. The old Oracle 6.0 behaviour is available by using the VARCHAR2(n) datatype.

-- 
   - Doug Harris
     Database Administrator,
     System Development Division,
     Statistics Canada             ### Standard Disclaimer Applies ###
Received on Wed Dec 29 1993 - 23:35:11 CET

Original text of this message