<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-841198618972981087</id><updated>2011-11-28T04:50:10.909+04:00</updated><category term='GSQL-Planet'/><category term='hld'/><title type='text'>Absorbent of The Mind</title><subtitle type='html'>Mostly about my open source development, GTK, Gnome, Linux</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-2295396809648527786</id><published>2010-07-07T13:56:00.000+04:00</published><updated>2010-07-07T13:56:57.697+04:00</updated><title type='text'>Four Rules for NULLs</title><content type='html'>&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;/* reprint from &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;a href="http://www.sqlservercentral.com/articles/Advanced+Querying/fourrulesfornulls/1915/"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;http://www.sqlservercentral.com/articles/Advanced+Querying/fourrulesfornulls/1915/&lt;/span&gt;&lt;/i&gt;&lt;/a&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: x-small;"&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;h1 style="color: #003366; font-size: 20px; font-weight: bold; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;4 Simple Rules for Handling SQL NULLs&lt;/h1&gt;&lt;h3 class="section" style="color: #003366; font-size: 15px; font-weight: bold; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Introduction&lt;/h3&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;"As we know,&lt;br /&gt;There are known knowns.&lt;br /&gt;There are things we know we know.&lt;br /&gt;We also know&lt;br /&gt;There are known unknowns.&lt;br /&gt;That is to say&lt;br /&gt;We know there are some things&lt;br /&gt;We do not know.”- Donald Rumsfeld&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In a recent article by James Travis, the handling of NULLs in SQL Server was explored. I discovered some inaccuracies in the article; some caused by inaccuracies in SQL Server Books Online, others rooted in trying to apply other standard 3GL and 4GL programming language two-valued logic to the three-valued logic employed by ANSI SQL.&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;This article was written to explain ANSI SQL three-valued logic and correct the inaccuracies presented&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #003366; font-size: 15px; font-weight: bold;"&gt;What is NULL?&lt;/span&gt;&lt;/div&gt;First, let's start by defining what a NULL is in SQL-speak. ANSI-SQL defines NULL as "a special value, or mark, that is used to indicate the absence of any data value." (ANSI-92) NULL in SQL is not a "data value", but rather an indicator that we have missing data. As an example, we’ll look at the following table which contains last name, first name and middle name.&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr bgcolor="#f0f0f0"&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Last_Name&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;First_Name&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Middle_Name&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;'Smith'&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;'Linda'&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;'Anita'&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;'Washington'&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;'Larry'&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;''&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;'Jones'&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;'John'&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;NULL&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;In this example, we know that Linda Smith has a middle name, and we know that it is 'Anita'. We have populated Larry Washington's Middle_Name column with a Zero-Length String ('') indicating that we know for a fact Larry has no middle name. These are the "known knowns" in Rumsfeld-speak.&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;In the case of John Jones, however, we have set the Middle_Name column to NULL. This indicates that we do not know whether John has a middle name or not. We may discover, in the future, that John has a middle name; likewise, we may discover he has no middle name. In either case, we will update his row accordingly. So, NULLs represent our "known unknowns"; the only thing we know for a fact is that we do *not* know whether John has a middle name or not.&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Because of the inherent issues surrounding NULLs and data integrity, three-valued logic, scalar arithmetic and performance, DBA's and Database Designers tend to try to minimize the use of NULLABLE columns in their tables.&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Rule #1: Use NULLs to indicate unknown/missing information only. Do not use NULLs in place of zeroes, zero-length strings or other "known" blank values. Update your NULLs with proper information as soon as possible.&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;h3 class="section" style="color: #003366; font-size: 15px; font-weight: bold; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Three-Valued Logic&lt;/h3&gt;Always in the Top 10 List of the most confusing aspects of ANSI SQL, for those coming from other 3GL and 4GL languages is three-valued logic. Anyone coming from a background in most other computer languages will instantly recognize the two-valued logic table:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr bgcolor="#f0f0f0"&gt;&lt;th colspan="4"&gt;Two-Valued Logic Table&lt;/th&gt;&lt;/tr&gt;&lt;tr align="center" bgcolor="#f0f0f0"&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;p&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;q&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;p AND q&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;p OR q&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;And of course the logic for NOT is fairly simple:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th bgcolor="#f0f0f0" colspan="4"&gt;Two-Valued NOT Logic Table&lt;/th&gt;&lt;/tr&gt;&lt;tr align="center" bgcolor="#f0f0f0"&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;p&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;NOT p&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;So what is Three-Valued Logic? In SQL three-valued logic, we introduce the concept of Unknown into our logic, which is closely associated with NULL. Our SQL Logic Table looks like this:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th bgcolor="#f0f0f0" colspan="4"&gt;Three-Valued Logic Table&lt;/th&gt;&lt;/tr&gt;&lt;tr align="center" bgcolor="#f0f0f0"&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;p&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;q&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;p AND q&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;p OR q&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Unknown&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;Unknown&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Unknown&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;Unknown&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Unknown&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;Unknown&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Unknown&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;Unknown&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center"&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Unknown&lt;/b&gt;&lt;/td&gt;&lt;td bgcolor="#ffff00" style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Unknown&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;Unknown&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;Unknown&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;And in SQL logic, the NOT logic table looks like this:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th bgcolor="#f0f0f0" colspan="2"&gt;Three-Valued NOT Logic Table&lt;/th&gt;&lt;/tr&gt;&lt;tr align="center" bgcolor="#f0f0f0"&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;p&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;NOT p&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center" bgcolor="#ffff00"&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;True&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;False&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center" bgcolor="#ffff00"&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;False&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;True&lt;/td&gt;&lt;/tr&gt;&lt;tr align="center" bgcolor="#ffff00"&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;Unknown&lt;/b&gt;&lt;/td&gt;&lt;td style="color: #2a2a2a; font-family: Arial, Helvetica, sans-serif;"&gt;Unknown&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;So how do we arrive at Unknown in these logic tables? Simply put, we try to compare NULLs to data values, or other NULLs. Per the ANSI-92 SQL Standard, comparisons with NULL always result in Unknown.&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Try the following SQL Query in Query Analyzer (requires the Northwind Sample Database):&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SET ANSI_NULLS ON&lt;br /&gt;SELECT * FROM [Northwind].[dbo].[Employees]&lt;br /&gt;WHERE [Region] IS NULL&lt;br /&gt;&lt;/pre&gt;This query returns four employee records. Now try this query:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SET ANSI_NULLS ON&lt;br /&gt;SELECT * FROM [Northwind].[dbo].[Employees]&lt;br /&gt;WHERE [Region] = NULL&lt;br /&gt;&lt;/pre&gt;This query returns no records. The reason for this is that '[Region] = NULL' evaluates to Unknown every time. Since it never evaluates to True for any rows, it returns no records.&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;NOTE: It has been widely misstated (even in SQL Server Books Online) that "the result of a comparison is false if one of the operands is NULL." In fact, the ANSI-92 SQL Standard states that if one of the operands is NULL, the result of the comparison is "UNKNOWN". (ANSI-92 SQL Standard) SQL Books Online has recently been updated to reflect the accurate ANSI Standard concerning NULL comparisons (See the update here:&lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_set-set_9rec.asp" style="color: #225588; text-decoration: none;"&gt;Microsoft ANSI_NULLS&lt;/a&gt;).&lt;/b&gt;&lt;/div&gt;&lt;h3 class="section" style="color: #003366; font-size: 15px; font-weight: bold; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;NULL Versus NULL&lt;/h3&gt;NULLs are not equal to other NULLs. In his article,&amp;nbsp;&lt;a href="http://www.sqlservercentral.com/columnists/jtravis/understandingthedifferencebetweenisnull.asp" style="color: #225588; text-decoration: none;"&gt;Understanding the Difference Between "IS NULL" and "=NULL"&lt;/a&gt;, James Travis states that a comparison to a variable initialized to NULL returns False. And it would appear so by his example:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;DECLARE @val CHAR(4)&lt;br /&gt;SET @val = NULL&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;If @val = NULL&lt;br /&gt;     PRINT 'TRUE'&lt;br /&gt;ELSE&lt;br /&gt;     PRINT 'FALSE'&lt;br /&gt;&lt;/pre&gt;Mr. Travis' example prints 'FALSE', which indicates that the result of the comparison '@val = NULL' is False. This is not the case, however. The result of '@val = NULL' is Unknown. The IF statement will print 'TRUE' if, and only if, the result of the comparison is True; otherwise it falls through to the ELSE statement and prints 'FALSE'. For three-valued logic, we need three comparisons to figure out what the actual result of the '@val = NULL' comparison is:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SET ANSI_NULLS ON&lt;br /&gt;DECLARE @val CHAR(4)&lt;br /&gt;SET @val = NULL&lt;br /&gt;SET ANSI_NULLS ON&lt;br /&gt;If @val = NULL&lt;br /&gt;     PRINT 'TRUE'&lt;br /&gt;ELSE IF NOT(@val = NULL)&lt;br /&gt;     PRINT 'FALSE'&lt;br /&gt;ELSE&lt;br /&gt;     PRINT 'UNKNOWN'&lt;br /&gt;&lt;/pre&gt;Now we see that the result of the comparison is neither True nor False. It is the third value in our three-valued logic, Unknown. Try this statement to demonstrate that NULL is not equal to other NULLs:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SET ANSI_NULLS ON&lt;br /&gt;IF NULL = NULL&lt;br /&gt;     PRINT 'TRUE'&lt;br /&gt;ELSE IF NOT (NULL = NULL)&lt;br /&gt;     PRINT 'FALSE'&lt;br /&gt;ELSE&lt;br /&gt;     PRINT 'UNKNOWN'&lt;br /&gt;&lt;/pre&gt;This statement prints 'UNKNOWN' because 'NULL = NULL' evaluates to Unknown. Since 'NULL = NULL' evaluates to Unknown, if we look back at the NOT Logic table for three-valued logic, we see that 'NOT(Unknown)' also evaluates to Unknown. This means that 'NOT(NULL = NULL)' is Unknown as well. So what do we expect when we run this statement?&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SET ANSI_NULLS ON&lt;br /&gt;IF NULL &amp;lt;&amp;gt; NULL&lt;br /&gt;     PRINT 'TRUE'&lt;br /&gt;ELSE IF NOT (NULL &amp;lt;&amp;gt; NULL)&lt;br /&gt;     PRINT 'FALSE'&lt;br /&gt;ELSE&lt;br /&gt;     PRINT 'UNKNOWN'&lt;br /&gt;&lt;/pre&gt;If you expect to see ‘TRUE’, guess again! ‘FALSE’? Not a chance. Remember what we said earlier – any comparisons with NULL evaluate to Unknown (neither True nor False). Since the comparisons in the IF statements evaluate to Unknown, ‘UNKNOWN’ is printed in this instance.&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The same is true for any comparisons with NULL under the ANSI Standard; whether you are comparing NULL to a CHAR, INT or any other value, variable or table column.&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Rule #2: In ANSI SQL, NULL is not equal to anything, even other NULLs! Comparisons with NULL always result in UNKNOWN.&lt;/b&gt;&lt;/div&gt;&lt;h3 class="section" style="color: #003366; font-size: 15px; font-weight: bold; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;NULL Variables&lt;/h3&gt;Variables that have been declared, but not yet initialized via SET statement default to NULL. They are treated exactly like any other NULL values. We can modify the previous queries to see this for ourselves:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SET ANSI_NULLS ON&lt;br /&gt;DECLARE @MyRegion NVARCHAR(15)&lt;br /&gt;SELECT * FROM [Northwind].[dbo].[Employees]&lt;br /&gt;WHERE [Region] = @MyRegion&lt;br /&gt;&lt;/pre&gt;This returns no rows, just like in the previous query with '=NULL' in the WHERE clause. This has exactly the same effect as the following:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SET ANSI_NULLS ON&lt;br /&gt;DECLARE @MyRegion NVARCHAR(15)&lt;br /&gt;SET @MyRegion = NULL&lt;br /&gt;SELECT * FROM [Northwind].[dbo].[Employees]&lt;br /&gt;WHERE [Region] = @MyRegion&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;NOTE: You cannot put a variable in place of NULL in the IS NULL clause. The following query will *not* work:&lt;/b&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SET ANSI_NULLS ON&lt;br /&gt;DECLARE @MyRegion NVARCHAR(15)&lt;br /&gt;SELECT * FROM [Northwind].[dbo].[Employees]&lt;br /&gt;WHERE [Region] IS @MyRegion&lt;br /&gt;&lt;/pre&gt;&lt;h3 class="section" style="color: #003366; font-size: 15px; font-weight: bold; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;ANSI Versus Microsoft&lt;/h3&gt;As we described above, the ANSI SQL Standard describes the result of any comparison with NULL as Unknown. So NULL = NULL, NULL&amp;nbsp;&amp;lt;&amp;gt; 10 and NULL&amp;nbsp;&amp;lt; ‘Hello’ are all Unknown.&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Presumably to make the transition smoother for 3GL and 4GL programmers from other languages moving over to SQL, Microsoft implemented the SET ANSI_NULLS OFF option, which allows you to perform = and&amp;nbsp;&amp;lt;&amp;gt; comparisons with NULL values. To demonstrate this in action, we can perform the following query:&lt;/div&gt;&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SET ANSI_NULLS OFF&lt;br /&gt;SELECT * FROM [Northwind].[dbo].[Employees]&lt;br /&gt;WHERE [Region] = NULL&lt;br /&gt;&lt;/pre&gt;This allows you to perform basic equality comparisons to NULL; however, SQL written using this option may not be portable to other platforms, and might confuse others who use ANSI Standard NULL-handling. Also, if you try to perform this query without turning ANSI_NULLS OFF first, you will get no rows returned. The safe bet is to use SET ANSI_NULLS ON.&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Rule #3: Use SET ANSI_NULLS ON, and always use ANSI Standard SQL Syntax for NULLs. Straying from the standard can cause problems including portability issues, incompatibility with existing code and databases and returning incorrect results.&lt;/b&gt;&lt;/div&gt;&lt;h3 class="section" style="color: #003366; font-size: 15px; font-weight: bold; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;NULL Math&lt;/h3&gt;One final point concerns math and string operations with NULLs. If you perform scalar math operations and string concatenation functions with NULL, the result is always NULL. For instance, this query returns NULL:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SELECT 1 + NULL&lt;br /&gt;&lt;/pre&gt;A numeric value plus, minus, divided by, or multiplied by NULL always equals NULL. A string concatenation with NULL equals NULL as well:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SELECT 'Joe' + NULL&lt;br /&gt;&lt;/pre&gt;So what if you want to treat NULL as a zero in a math operation? Use SQL's COALESCE() function:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SELECT 1 + COALESCE(NULL, 0)&lt;br /&gt;&lt;/pre&gt;The COALESCE() function returns the first non-NULL value in its list of values. So in the statement above, "COALESCE(NULL, 0)" returns 0. The SELECT statement above returns 1. Similarly you can use COALESCE() in string concatenations:&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/div&gt;&lt;pre class="code" style="background-color: #f0f0ff; border-bottom-color: rgb(153, 177, 255); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(153, 177, 255); border-left-style: dotted; border-left-width: 1px; border-right-color: rgb(153, 177, 255); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(153, 177, 255); border-top-style: dotted; border-top-width: 1px; color: black; font-family: 'Courier New'; font-size: 14px; max-height: 400px; overflow-x: auto; overflow-y: auto;"&gt;SELECT 'Joe' + COALESCE(NULL, '')&lt;br /&gt;&lt;/pre&gt;The COALESCE() function in this case returns a Zero-Length String, which is appended to 'Joe'. The end result is that 'Joe' is returned instead of NULL. SQL Server provides an additional function called ISNULL() which performs similarly to COALESCE(). Use the COALESCE() function (or alternatively use CASE), as it is ANSI standard syntax.&lt;div style="margin-bottom: 0.6em; margin-left: 0px; margin-right: 0px; margin-top: 0.6em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;b&gt;Rule #4: The ANSI Standard COALESCE() and CASE syntaxes are preferred over ISNULL() or other proprietary syntax.&lt;/b&gt;&lt;/div&gt;&lt;h3 class="section" style="color: #003366; font-size: 15px; font-weight: bold; margin-bottom: 0.2em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Conclusions&lt;/h3&gt;SQL NULLs and three-valued logic can be confusing for a new SQL Database Designer; particularly if you are coming from a background in another 3GL or 4GL language that uses two-valued logic (i.e., C++, VB, etc.) Learning when and how to use NULLs in your databases, how SQL handles NULLs, and the results of comparisons and math/string operations with NULLs in SQL is very important in order to obtain consistent and optimized results.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-2295396809648527786?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/2295396809648527786/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2010/07/four-rules-for-nulls.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/2295396809648527786'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/2295396809648527786'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2010/07/four-rules-for-nulls.html' title='Four Rules for NULLs'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-5588536355344763326</id><published>2010-06-02T01:57:00.000+04:00</published><updated>2010-06-02T01:57:11.727+04:00</updated><title type='text'>GSQL in PPA</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;From that&lt;/span&gt;&lt;/span&gt; moment you can download GSQL from Ubuntu's PPA (for 10.04). These packages have only &amp;nbsp;PostgreSQL and MySQL support. Oracle support is not included. So, to use it you should make a some action:&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ sudo add-apt-repository ppa:halturin/gsql&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ sudo apt-get update&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;$ sudo apt-get install gsql gsql-postgresql-engine gsql-mysql-engine&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Enjoy! :)&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-5588536355344763326?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/5588536355344763326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2010/06/gsql-in-ppa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/5588536355344763326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/5588536355344763326'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2010/06/gsql-in-ppa.html' title='GSQL in PPA'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-3762825432246211405</id><published>2010-04-05T22:56:00.001+04:00</published><updated>2010-04-06T11:12:03.686+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hld'/><title type='text'>The obvious thing... but not all knows it.</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_DP5SWodaFVY/S7ox82CeVMI/AAAAAAAAAYE/TTYa1Mlc32Y/s1600/g6872.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_DP5SWodaFVY/S7ox82CeVMI/AAAAAAAAAYE/TTYa1Mlc32Y/s320/g6872.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-3762825432246211405?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/3762825432246211405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2010/04/obvious-thing-but-not-all-knows-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/3762825432246211405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/3762825432246211405'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2010/04/obvious-thing-but-not-all-knows-it.html' title='The obvious thing... but not all knows it.'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_DP5SWodaFVY/S7ox82CeVMI/AAAAAAAAAYE/TTYa1Mlc32Y/s72-c/g6872.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-8551015850575722100</id><published>2010-04-01T23:02:00.003+04:00</published><updated>2010-04-01T23:05:12.668+04:00</updated><title type='text'>Become a Friend of GNOME!</title><content type='html'>Help support the GNOME Foundation's goal to provide a free desktop for all users - become a Friend of GNOME. Your donation will ensure that GNOME continues to be a free and open source desktop by providing resources to developers, software and education for end users, and promotion for GNOME worldwide.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.gnome.org/friends/"&gt; &lt;img src="http://www.gnome.org/friends/banners/fog-480x60.png" alt="Become a Friend of GNOME" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-8551015850575722100?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/8551015850575722100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2010/04/become-friend-of-gnome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/8551015850575722100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/8551015850575722100'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2010/04/become-friend-of-gnome.html' title='Become a Friend of GNOME!'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-3003381968973028226</id><published>2010-03-25T03:51:00.005+03:00</published><updated>2010-03-25T04:01:24.800+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GSQL-Planet'/><title type='text'>GSQL 0.2.2</title><content type='html'>&lt;b&gt;The « laty » release.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This release comes with an initial version of PostgreSQL engine and this is a significant step forward in the development of the project.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Whats new:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;PostgreSQL support (experimental)&lt;/li&gt;&lt;li&gt;&amp;nbsp;Plugin Tunnel (libssh 0.4.* is required)&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Bugs fixed:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;Fix some typos and GUI stuff (#25 and #29)&lt;/li&gt;&lt;li&gt;&amp;nbsp;Fix oracle crashed on deleting variables (#23)&lt;/li&gt;&lt;li&gt;&amp;nbsp;Added port number to MySQL and PGSQL login dialog (#21)&lt;/li&gt;&lt;li&gt;&amp;nbsp;Fix mysql crashed with invalid query (#30)&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Latest versions are available at:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp;Source code: http://code.google.com/p/gsql/downloads/list&lt;/li&gt;&lt;li&gt;&amp;nbsp;&amp;nbsp;Ubuntu's binary: able to download after Ubuntu 10.04 release &lt;a href="https://launchpad.net/~halturin/+archive/gsql"&gt;here&lt;/a&gt;&amp;nbsp;or use&lt;br /&gt;&lt;code&gt;$ sudo add-apt-repository ppa:halturin/gsql&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;Multiple engines and plugins helps defining a better API for GSQL, so contributions&lt;br /&gt;are welcome! If you want to contribute you can ask for information and report bugs at:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;#gsql on freenode&lt;/li&gt;&lt;li&gt;&amp;nbsp;GSQL's mailing list: http://groups.google.com/group/gsql-dev&lt;/li&gt;&lt;li&gt;&amp;nbsp;Bug report: http://code.google.com/p/gsql/issues/list&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://halturin.blogspot.com/2010/03/gsql-022.html"&gt;What's next?&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;You will expect another one release in the 0.2 branch and it will be bug-fix release. But the most interesting will be further. From this time all the resourses have been moved on the branch refact.API.stage2. This project has a new stage of evolution.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;A new representational model of the tree structure of the database objects. Now all data will be stored in XML-tree. This feature will allow us to make the most flexible tool to support versioning databases. As you know, different versions of the &amp;nbsp;databases have a different set of objects. The SQL-queries for getting object's information are also have changes from version to version. So, how will it be? For example, let's see sample pictures explaining some details:&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://pics.livejournal.com/halturin/pic/00009p6g/"&gt;&lt;img alt="" border="0" height="102" src="http://pics.livejournal.com/halturin/pic/00009p6g/s320x240" width="140" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://pics.livejournal.com/halturin/pic/0000a8sq/"&gt;&lt;img alt="" border="0" height="66" src="http://pics.livejournal.com/halturin/pic/0000a8sq/s320x240" width="140" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://pics.livejournal.com/halturin/pic/0000bb44/"&gt;&lt;img alt="" border="0" height="78" src="http://pics.livejournal.com/halturin/pic/0000bb44/s320x240" width="140" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;a href="http://pics.livejournal.com/halturin/pic/00001bkb/"&gt;&lt;img alt="" border="0" height="72" src="http://pics.livejournal.com/halturin/pic/00001bkb/s320x240" width="140" /&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://pics.livejournal.com/halturin/pic/0000cegt/"&gt;&lt;img alt="" border="0" height="70" src="http://pics.livejournal.com/halturin/pic/0000cegt/s320x240" width="140" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;The elements of the interface will become dockable. To realize this feature we will use the 'libgdl' library (it is a part of Anjuta project). The main menu will be completely redesigned. It means that all items of the menu will have correct behaviour which will depend on activity/availability of the functional.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;SQL-editor - is the main tool of this project. It will undergo a lot of architectural changes. Also the most usable feature is able to customize hotkeys. It means you can set your favorite shortcuts scheme from the list of preset.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;GNOME 3.0 migration.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;The new API will be more usable and greatly simplify the development of your own Engines and Plugins. We will finish writing the WIKI-pages (NavTreeCookBook, HowtoWriteObjectEditor, HowtoWriteAPlugin, HowtoWriteAnEngine).&lt;/li&gt;&lt;/ul&gt;It is just a plan list of the 0.3.0 release. Namely this version will give a new wave of the project growth. So many things we would like to do, so many plans and we have a great desire to realize it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-3003381968973028226?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/3003381968973028226/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2010/03/gsql-022.html#comment-form' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/3003381968973028226'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/3003381968973028226'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2010/03/gsql-022.html' title='GSQL 0.2.2'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-3803452714079979971</id><published>2009-09-03T19:50:00.003+04:00</published><updated>2009-09-03T20:08:23.711+04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GSQL-Planet'/><title type='text'>PostgreSQL support.</title><content type='html'>A few day ago Estêvão Samuel Procópio sent a &lt;a href="http://groups.google.com/group/gsql-dev/browse_thread/thread/feec69fc8f5e8b50"&gt;letter&lt;/a&gt; to the mailing list that he is developing PostgreSQL support for my project. It is a really excellent news for me! So... the next release will include this 'engine' with 'experimental' status.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-3803452714079979971?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/3803452714079979971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2009/09/postgresql-support.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/3803452714079979971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/3803452714079979971'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2009/09/postgresql-support.html' title='PostgreSQL support.'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-7869226360929093756</id><published>2009-07-20T11:36:00.000+04:00</published><updated>2009-07-20T11:37:29.129+04:00</updated><title type='text'>Why I'm not using libgda/ODBC/and.so.on</title><content type='html'>I was constantly asked about not using ODBC. If my project is point at GNOME desktop integration, I'll not use the exist library (libgda) to the database accesss (libgda is the part of the GNOME­DB project). To answer this questions please read &lt;a href="http://code.google.com/p/gsql/wiki/GSQLvsLIBGDAnMERGEANT"&gt;this wiki page&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-7869226360929093756?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/7869226360929093756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2009/07/why-im-not-using-libgdaodbcandsoon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/7869226360929093756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/7869226360929093756'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2009/07/why-im-not-using-libgdaodbcandsoon.html' title='Why I&apos;m not using libgda/ODBC/and.so.on'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-7829017881332178369</id><published>2009-06-14T20:58:00.002+04:00</published><updated>2009-06-14T21:01:43.569+04:00</updated><title type='text'>New logo!</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://gsql.org/images/gsql.logo.new.png"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 216px; height: 258px;" src="http://gsql.org/images/gsql.logo.new.png" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;A few days ago i asked my friends (http://linuxgraphics.ru) for drawing a new logo. So... Konstantin Rotkevich has done it.&lt;br /&gt;How do you find it?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I think it is perfect! &lt;a href="http://gsql.org"&gt;There&lt;/a&gt; will be a new design with new logo in the near future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-7829017881332178369?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/7829017881332178369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2009/06/new-logo.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/7829017881332178369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/7829017881332178369'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2009/06/new-logo.html' title='New logo!'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-6402437395836560007</id><published>2008-12-23T09:27:00.001+03:00</published><updated>2008-12-23T09:29:25.889+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GSQL-Planet'/><title type='text'>GSQL 0.2.1 Released.</title><content type='html'>In this release we fixed some bugs:&lt;br /&gt;&lt;br /&gt;- Issue 7 (oracle-engine: SIGSEGV with TIMESTAMP data type)&lt;br /&gt;- Issue 10 (restoring the window state after restart is fixed now)&lt;br /&gt;- Issue 6 (mysql-engine: case sensitive on the database object names)&lt;br /&gt;- Issue 17 (fix FreeBSD build)&lt;br /&gt;&lt;br /&gt;Buildsystem was cleaned up (Now the files are installed according to&lt;br /&gt;standards).&lt;br /&gt;&lt;br /&gt;Debian build routines rewritten from scratch. Fixes for RPM building.&lt;br /&gt;&lt;br /&gt;There are also several improvements:&lt;br /&gt;&lt;br /&gt;- oracle-engine: scanning of tnsnames.ora - you can select alias name&lt;br /&gt;from the drop-down list, or simply start typing the name of an alias&lt;br /&gt;and get suggested autocompletion.&lt;br /&gt;&lt;br /&gt;- option to switch window to fullscreen mode&lt;br /&gt;&lt;br /&gt;- the logon window now includes action by default. you do not have to&lt;br /&gt;aim to click "OK", just press Enter.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First, I would like to thank the developers Dmitry Oboukhov (Debian)&lt;br /&gt;and Pavel Shevchuk (Fedora) for a great help in adapting build on&lt;br /&gt;these distributions. I hope to see this project in official&lt;br /&gt;repositories of these distributions in near future.&lt;br /&gt;&lt;br /&gt;Also thanks to all who wrote bug reports! Thank you all! I'm looking&lt;br /&gt;forwards to see more bugreports ;-)&lt;br /&gt;&lt;br /&gt;Happy New Year everyone! Merry Christmas!&lt;br /&gt;&lt;br /&gt;See you next year!&lt;br /&gt;&lt;br /&gt;PS: Uninstall all previous ubuntu packages prior to installing new&lt;br /&gt;version.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-6402437395836560007?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/6402437395836560007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2008/12/gsql-021-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/6402437395836560007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/6402437395836560007'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2008/12/gsql-021-released.html' title='GSQL 0.2.1 Released.'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-841198618972981087.post-8376399432952313144</id><published>2008-11-30T00:18:00.007+03:00</published><updated>2008-11-30T01:02:29.778+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='GSQL-Planet'/><title type='text'>GSQL 0.2.0 released!</title><content type='html'>Announcing the first public release of project GSQL version 0.2.0&lt;br /&gt;&lt;br /&gt;GSQL is an integrated database development environment for GNOME. It is designed to support multiple database engines, so far MySQL and Oracle are supported.&lt;br /&gt;&lt;br /&gt;This release introduces:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;SQL editor&lt;/li&gt;&lt;li&gt;PL /SQL editor (in triggers, functions, procedures and packages) accessible in Oracle engine.&lt;/li&gt;&lt;li&gt;tree-like database object navigation&lt;/li&gt;&lt;li&gt;using standard notification service for pop up messages. E. g. in case of inactivity user will be notified on query completion&lt;/li&gt;&lt;li&gt;create and connect to a duplicate session with parameters copied from the active session, all in one click&lt;/li&gt;&lt;li&gt;configuration improved. It is now possible to tune GSQL look, customize editor and set up the settings of DBMS engine, e.g. set custom environment variables to access Oracle&lt;/li&gt;&lt;li&gt;new plugins:&lt;ul&gt;&lt;br /&gt;&lt;li&gt;Terminal: opens a terminal session with parameters (such as login, password etc) taken from the active session&lt;/li&gt;&lt;li&gt;Exporter: exports query results to a CVS file. So far only fetched records could be exported&lt;/li&gt;&lt;li&gt;Runner: periodically executes SQL queries.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Release remarks:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;MySQL engine:&lt;ul&gt;&lt;br /&gt;           &lt;li&gt;MySQL server version 5 and higher is required. GSQL relies on information_schema, which was introduced in version 5.0&lt;/li&gt;&lt;br /&gt;           &lt;li&gt;You can not cancel a running query as easy as in Oracle due to API limitations. You can always open a terminal session and cancel the query with “KILL QUERY”&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt; &lt;li&gt;Oracle engine:&lt;ul&gt;&lt;br /&gt;          &lt;li&gt;This version was tested with Oracle version 10.1.0.2.0. Should you experience any troubles with different Oracle versions please report to GSLQ authors&lt;/li&gt;&lt;br /&gt;          &lt;li&gt;It is not recommended to use oracle-xe-client from http://oss.oracle.com/debian repository, there are known issues with NLS with this client.&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;GSQL API is now stable enough, and you are highly encouraged to contribute your own plugins or support additional database engines.&lt;br /&gt;&lt;br /&gt;We wish GSQL could become the main database development tool in GNOME one day.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/841198618972981087-8376399432952313144?l=halturin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://halturin.blogspot.com/feeds/8376399432952313144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://halturin.blogspot.com/2008/11/gsql-020-released.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/8376399432952313144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/841198618972981087/posts/default/8376399432952313144'/><link rel='alternate' type='text/html' href='http://halturin.blogspot.com/2008/11/gsql-020-released.html' title='GSQL 0.2.0 released!'/><author><name>Taras Halturin</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh4.googleusercontent.com/-SNbTeijgKp4/AAAAAAAAAAI/AAAAAAAABwk/jcFIs8dD9z8/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry></feed>
