Comments on: Why IS NULL doesn’t always work in MySQL http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/ Stay curious! Fri, 10 May 2013 18:25:19 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: Xaprb http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10332 Xaprb Sat, 02 Jun 2007 02:16:50 +0000 http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10332 Well, 2 and 3 were easy because I didn’t encounter them “in the wild” — I read about them in the manual accidentally. But #1, well, that one took me a while to understand. It was a weird failing test that ran in production but failed in the test environment, which was configured differently. Then again just a few days ago, my coworker ran into the same thing (because I accidentally mis-configured the test DB servers again) and it reminded me of it.

]]>
By: Ronald Bradford http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10310 Ronald Bradford Fri, 01 Jun 2007 22:58:59 +0000 http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10310 Very insightful. The question Baron is how long did it take you to work out the point 1,2 and 3.

Obviously other factors like when in the day, what other fires and alcohol are all valid excuses to claim it took longer then you are prepared to admit.

RTFM. Even I found the same yet again today in “Innodb Monitoring I didn’t know” — http://blog.arabx.com.au/?p=702

]]>
By: Rdb Notes · Why IS NULL doesn’t always work in MySQL at Xaprb http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10242 Rdb Notes · Why IS NULL doesn’t always work in MySQL at Xaprb Fri, 01 Jun 2007 14:24:25 +0000 http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10242 [...] Why IS NULL doesn’t always work in MySQL at Xaprb How can a query like “SELECT * FROM tbl WHERE col IS NULL” return a row where the column has a (non-NULL) value? Read on to find out. [...]

]]>
By: Xaprb http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10207 Xaprb Fri, 01 Jun 2007 13:19:05 +0000 http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10207 Yes, I like SQL Server’s behavior better too. It’s an auto-generated number — it should have a big “can’t touch this” sign in front of it.

]]>
By: Bill http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10206 Bill Fri, 01 Jun 2007 13:16:49 +0000 http://www.xaprb.com/blog/2007/05/31/why-is-null-doesnt-always-work-in-mysql/#comment-10206 IMO, it should error out when you attempt to put a value in the auto increment field without first stating that you intended to do that (turn it off). That’s how SQL Server works, and is in all honesty, much more intuitive in this regard.

]]>