Difference between NULL and Null in Mysql

I need to check that the value of a specific column with the name is RESULTempty or not.

When I check if RESULT IS NULL, the request failed, but when I checked RESULT='', it worked.

What is the difference between the two.

please explain.

"UPDATE RLS_TP_2012_03 a, RLS_TP_2012_03 b SET a.COMMENT=b.COMMENT where b.TCODE='T1199' and  a.GROUPNAME='xyz' and a.HLABNO=b.HLABNO and a.RESULT =''; ";   
"UPDATE RLS_TP_2012_03 a, RLS_TP_2012_03 b SET a.COMMENT=b.COMMENT where b.TCODE='T1199' and  a.GROUPNAME='xyz' and a.HLABNO=b.HLABNO and a.RESULT is NULL; "
+4
source share
4 answers
  • NULL- this is the lack of meaning. An empty string is a value, but it is simply empty. NULLis special for the database.

  • NULLhas no boundaries, it can be used for fields string, integer, dateetc. in the database.

  • NULL - , string NULL - , . IS , , , "".

+17

NULL "" "". ", ".

, . , , , Oracle: -)

, NULL ( not null), "" (, integer).

+1

NULL in database systems - no value is set for the field. Emptiness

NULL (character) - space, ASCII / Unicode character without graphic representation. But it is present in the code page as a character constant '\ 0' with a character value of 0 or 000.

0
source

Adding to @ricky, NULL can never be NULL, but an empty string is always equal to an empty string. This is a huge difference when you try to match records.

0
source

Source: https://habr.com/ru/post/1546242/


All Articles