<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Oracle NVL Equivalent in MySQL</title>
	<atom:link href="http://kwatog.com/blog/mysql/oracle-nvl-equivalent-in-mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://kwatog.com/blog/mysql/oracle-nvl-equivalent-in-mysql/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oracle-nvl-equivalent-in-mysql</link>
	<description>tech notes and general nonsense</description>
	<lastBuildDate>Wed, 09 May 2012 08:50:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: admin</title>
		<link>http://kwatog.com/blog/mysql/oracle-nvl-equivalent-in-mysql/#comment-30</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sat, 25 Dec 2010 07:51:15 +0000</pubDate>
		<guid isPermaLink="false">http://kwatog.com/?p=204#comment-30</guid>
		<description>thanks! I&#039;ll take note of that.</description>
		<content:encoded><![CDATA[<p>thanks! I&#8217;ll take note of that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mpapec</title>
		<link>http://kwatog.com/blog/mysql/oracle-nvl-equivalent-in-mysql/#comment-29</link>
		<dc:creator>mpapec</dc:creator>
		<pubDate>Thu, 23 Dec 2010 08:08:32 +0000</pubDate>
		<guid isPermaLink="false">http://kwatog.com/?p=204#comment-29</guid>
		<description>If you want empty string to be null as well you could use:

eg.
update mytable set
  name = ifnull(nullif(&#039;newval&#039;,&#039;&#039;), name)
where id=1

ps. also, when newval are only spaces, nullif also gives null as a result</description>
		<content:encoded><![CDATA[<p>If you want empty string to be null as well you could use:</p>
<p>eg.<br />
update mytable set<br />
  name = ifnull(nullif(&#8216;newval&#8217;,&#8221;), name)<br />
where id=1</p>
<p>ps. also, when newval are only spaces, nullif also gives null as a result</p>
]]></content:encoded>
	</item>
</channel>
</rss>

