Hello
I’ve discovered that SQL (HSQLDB) has the possibility to create temporary tables that you can use to load data in a query, and you can perform operations with that temporary table.
However, I have some doubts about how this work.
Could someone give me an example of this?
I have a demo database, very simple, with the fields ID, primary key, Name, for the name, Lastname, for the last name and age. 20 registries.
Then, I did a simply query. Listing those records whose age be superior to 30 years old.
I have this simple code.
SELECT "Name",
"Lastname",
"Age"
FROM "tbl_names_and_ages"
WHERE "Age" > 30
Okay.
How may I load that data from that query to a temporary table and show the results of that temporary table?
With that example, I think I’ll should be able to understand how temporary tables work.
I tried to type some code, but I always get error, so any help would be highly appreciated.
Cheers
You can download that demo database from this link:
https://mega.co.nz/#!RZojmTrS!davoeKfKc_GQh2dn2IQv7D04kZH1w9qHoFEbbHh8ZDI