|
Take a look at Global temporary table documentation at:
http://incubator.apache.org/derby/docs/10.0/manuals/reference/sqlj33.html#HDRDECLARETEMPTABLE The default behavior is to DELETE rows on a commit. So, right after your insert, a COMMIT is issued, which is deleting the rows. So, you need to declare the temporary table with ON COMMIT PRESERVE ROWS option. Otherway to see your insert data is by setting AUTOCOMMIT OFF in IJ, which prevents issuing a COMMIT. (until you issue a commit) ij> declare global temporary table t (n varchar(15), u varchar(15)) not logged; 0 rows inserted/updated/deleted ij> autocommit off; ij> insert into session.t values('a','b'); 1 row inserted/updated/deleted ij> select * from session.t; N |U ------------------------------- a |b 1 row selected Satheesh John English wrote: My application needs to use a temporary table, but they don't seem to |
- Temporary tables don't work? John English
- Re: Temporary tables don't work? Satheesh Bandaram
- Re: Temporary tables don't work? John English
- Re: Temporary tables don't work? Jean T. Anderson
- Re: Temporary tables don't work? John English
- Re: Temporary tables don't work? Daniel John Debrunner
- Re: Temporary tables don't work? John English
