Nulls

Setup

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 t1
( 
  key number, 
  group_key varchar2(10), 
  val varchar2(10)
);

insert into t1 values ( 1, 'Group-1', null );
insert into t1 values ( 2, 'Group-1', null );
insert into t1 values ( 3, 'Group-2', 'a'  );
insert into t1 values ( 4, 'Group-2', 'a'  );
insert into t1 values ( 5, 'Group-2', 'z'  );
insert into t1 values ( 6, 'Group-2', 'z'  );
insert into t1 values ( 7, 'Group-2', null );
insert into t1 values ( 8, 'Group-3', 'A'  );
insert into t1 values ( 9, 'Group-3', 'A'  );
insert into t1 values (10, 'Group-3', 'Z'  );

commit;

set null '(null)'

 



Linking to SQL Snippets ™

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

  • [url=http://www.sqlsnippets.com/en/topic-12652.html]SQL Snippets: Nulls - Setup[/url]

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

  • <a href="http://www.sqlsnippets.com/en/topic-12652.html">SQL Snippets: Nulls - Setup</a>

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

  • Link Text : SQL Snippets: Nulls - Setup
  • URL (href): http://www.sqlsnippets.com/en/topic-12652.html