dbTalk Databases Forums  

like ""?

comp.databases.mysql comp.databases.mysql


Discuss like ""? in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: like ""? - 03-03-2011 , 03:34 AM






onedbguru <onedbguru (AT) yahoo (DOT) com> wrote:
Quote:
All that I was saying was that you need to be careful... Not all
database engines treat empty string the same as null.
I don't know any such engine. But of course this would be a major flaw.

Quote:
In MySQL, it would be interesting to dump the data block to see what
is actually stored on disk to differentiate ES vs NULL.
NULL is not a value but rather a separate quality of a column. Most
engines in MySQL have a NULL bitmap associated with the row. If a
column is declared nullable, it has a bit in there and if the column
is NULL, then the bit is set and no value is stored for the column
at all. Details can be found in the "Internals Manual". i.e.

http://forge.mysql.com/wiki/MySQL_In...cord_Structure


XL

Reply With Quote
  #12  
Old   
Álvaro G. Vicario
 
Posts: n/a

Default Re: like ""? - 03-03-2011 , 05:51 AM






El 03/03/2011 10:34, Axel Schwenke escribió/wrote:
Quote:
onedbguru<onedbguru (AT) yahoo (DOT) com> wrote:

All that I was saying was that you need to be careful... Not all
database engines treat empty string the same as null.

I don't know any such engine. But of course this would be a major flaw.
That engine is called Oracle.



--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--

Reply With Quote
  #13  
Old   
Lennart Jonsson
 
Posts: n/a

Default Re: like ""? - 03-03-2011 , 05:56 AM



On 2011-03-03 10:34, Axel Schwenke wrote:
Quote:
onedbguru <onedbguru (AT) yahoo (DOT) com> wrote:

All that I was saying was that you need to be careful... Not all
database engines treat empty string the same as null.

I don't know any such engine. But of course this would be a major flaw.

You don't have to look that far :-) Not sure if the situation still
exists, but it has been this way for long time. Found this link:

http://www.techonthenet.com/oracle/q...empty_null.php


/Lennart

[...]

Reply With Quote
  #14  
Old   
The Natural Philosopher
 
Posts: n/a

Default Re: like ""? - 03-03-2011 , 06:00 AM



Lennart Jonsson wrote:
Quote:
On 2011-03-03 10:34, Axel Schwenke wrote:
onedbguru <onedbguru (AT) yahoo (DOT) com> wrote:
All that I was saying was that you need to be careful... Not all
database engines treat empty string the same as null.
I don't know any such engine. But of course this would be a major flaw.


You don't have to look that far :-) Not sure if the situation still
exists, but it has been this way for long time. Found this link:

http://www.techonthenet.com/oracle/q...empty_null.php


/Lennart

[...]
Yech. This really needs a definition the the SQL language itself to make
it one way or another, or code portability is badly affected..

Reply With Quote
  #15  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: like ""? - 03-03-2011 , 03:21 PM



On 3/3/2011 6:56 AM, Lennart Jonsson wrote:
Quote:
On 2011-03-03 10:34, Axel Schwenke wrote:
onedbguru<onedbguru (AT) yahoo (DOT) com> wrote:

All that I was saying was that you need to be careful... Not all
database engines treat empty string the same as null.

I don't know any such engine. But of course this would be a major flaw.


You don't have to look that far :-) Not sure if the situation still
exists, but it has been this way for long time. Found this link:

http://www.techonthenet.com/oracle/q...empty_null.php


/Lennart

[...]
Hmmm, seems Oracle is seriously broken, according to the SQL91 standard.

I wonder if its still true in current versions of Oracle. I know both
DB2 and SQL Server have had it correct for a long time (DB2 way back in
the 80's).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
  #16  
Old   
Lennart Jonsson
 
Posts: n/a

Default Re: like ""? - 03-03-2011 , 05:29 PM



On 2011-03-03 22:21, Jerry Stuckle wrote:
[...]
Quote:
Hmmm, seems Oracle is seriously broken, according to the SQL91 standard.

I wonder if its still true in current versions of Oracle. I know both
DB2 and SQL Server have had it correct for a long time (DB2 way back in
the 80's).

Not sure, but I think it does (discussions about 11g regarding this
exists). I suspect it to be one of those backward compatibility things.


/Lennart

Reply With Quote
  #17  
Old   
Lennart Jonsson
 
Posts: n/a

Default Re: like ""? - 03-03-2011 , 05:40 PM



On 2011-03-03 13:00, The Natural Philosopher wrote:
[...]
Quote:
Yech. This really needs a definition the the SQL language itself to make
it one way or another, or code portability is badly affected..

The definition do exists. I might be wrong but I think this is why
Oracle introduced the varchar2 data type. Perhaps someone with a greater
insight can fill in the details?


/Lennart

Reply With Quote
  #18  
Old   
Doug Miller
 
Posts: n/a

Default Re: like ""? - 03-03-2011 , 09:25 PM



In article <ikp0p0$ahv$1 (AT) news (DOT) eternal-september.org>, Jerry Stuckle <jstucklex (AT) attglobal (DOT) net> wrote:
Quote:
On 3/3/2011 6:56 AM, Lennart Jonsson wrote:
On 2011-03-03 10:34, Axel Schwenke wrote:
onedbguru<onedbguru (AT) yahoo (DOT) com> wrote:

All that I was saying was that you need to be careful... Not all
database engines treat empty string the same as null.

I don't know any such engine. But of course this would be a major flaw.


You don't have to look that far :-) Not sure if the situation still
exists, but it has been this way for long time. Found this link:

http://www.techonthenet.com/oracle/q...empty_null.php


/Lennart

[...]

Hmmm, seems Oracle is seriously broken, according to the SQL91 standard.

I wonder if its still true in current versions of Oracle.
Still true in 10g, which is the latest version I have experience with.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.