Nulls and Equality


Run the code on this page in SQL*Plus to create the sample tables, data, etc. used by the examples in this section.

Be sure to read Using SQL Snippets ™ before executing any of these setup steps.

create table t
( c1 number       ,
  c2 varchar2(10) ,
  c3 varchar2(10)

insert into t values( 1, 'A'  , 'A'  );
insert into t values( 2, 'A'  , 'B'  );
insert into t values( 3, null , 'A'  );
insert into t values( 4, null , null );


set null         '(null)'
set numformat    99
set serveroutput on

Linking to SQL Snippets ™

To link to this page in Oracle Technology Network Forums or OraFAQ Forums cut and paste this code.

  • [url=]SQL Snippets: Nulls and Equality - Setup[/url]

To link to this page in HTML documents or Blogger comments cut and paste this code.

  • <a href="">SQL Snippets: Nulls and Equality - Setup</a>

To link to this page in other web sites use the following values.

  • Link Text : SQL Snippets: Nulls and Equality - Setup
  • URL (href):