alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

HSQLDB example source code file (TestSelfJoins.txt)

This example HSQLDB source code file (TestSelfJoins.txt) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - HSQLDB tags/keywords

The HSQLDB TestSelfJoins.txt source code

--
-- TestSelfJoins.txt
--
create table tsj1 (a integer primary key, b integer);
insert into tsj1 values(5,5);
insert into tsj1 values(6,6);
insert into tsj1 values(11,21);
insert into tsj1 values(12,22);
insert into tsj1 values(13,23);
insert into tsj1 values(14,24);
insert into tsj1 values(15,25);
insert into tsj1 values(16,26);
insert into tsj1 values(17,27);
/*r3*/select count(*) from tsj1 where a > 14
/*r3*/select count(*) from tsj1 where a > '14'
/*r5*/select count(*) from tsj1 where cast(a as character) > '14'
/*r81*/select count(*) from tsj1 a cross join tsj1 b
/*e*/select count(*) from tsj1 a cross join tsj1 b on a.a = b.a
/*r9*/select count(*) from tsj1 a inner join tsj1 b on a.a = b.a

Other HSQLDB examples (source code examples)

Here is a short list of links related to this HSQLDB TestSelfJoins.txt source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.