[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql-java
Subject:    Re: Are scrollable ResultSets completly fetched from server?
From:       Mark Matthews <mark () mysql ! com>
Date:       2005-09-03 12:34:07
Message-ID: 4319983F.3020901 () mysql ! com
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Clemens Eisserer wrote:
> Thanks a lot, Mark!
> 
> Since I am quite new to SQL I do not have any deep SQL knowledge but
> this approach seems to be really the best compared to the ideas I had.
> However do you think modern RDBS will come clear with creating and
> removing tables on the fly?
> 
> Thanks again, lg Clemens
> 

Clemens,

If you use the "temporary" syntax, the table is automatically dropped
when the connection is dropped. I would do something similar to the
following if it were my code:

CREATE TEMPORARY TABLE foo IF NOT EXISTS ....

TRUNCATE TABLE foo

(to make sure no rows are left over from a previous query)

INSERT INTO ... SELECT ...

(see http://dev.mysql.com/doc/mysql/en/insert-select.html)

I wouldn't worry about databases being able to deal with temporary
tables, creating and dropping them on the fly, since almost all of them
do that behind the scenes to resolve certain types of queries.

Regards,

	-Mark

- --
Mark Matthews
MySQL AB, Software Development Manager - Connectivity
www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDGZg/tvXNTca6JD8RAoz4AJ0XfkWEKnhAjFU+64c/N9mYIeIgFgCeIQEN
fl9blm3SOw/xbAPkcBlviJA=
=pA/y
-----END PGP SIGNATURE-----

-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/java?unsub=mysql-java@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic