wood burning stoves 2.0*
The moose likes JDBC and the fly likes Max length of select statement Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Max length of select statement" Watch "Max length of select statement" New topic
Author

Max length of select statement

sathiya mohan
Greenhorn

Joined: Jan 12, 2009
Posts: 9
is there a maximum length of select statement ?
Debasis behera
Greenhorn

Joined: Oct 26, 2009
Posts: 14
It's 64K, according to the Oracle9i Database Reference

java
sathiya mohan
Greenhorn

Joined: Jan 12, 2009
Posts: 9
Thanks for your reply. will these size get change depending on the database ?. I would like to know for Sql Server and Mysql.
Debasis behera
Greenhorn

Joined: Oct 26, 2009
Posts: 14
yes it chages, you goto that database manuals
sathiya mohan
Greenhorn

Joined: Jan 12, 2009
Posts: 9
I found the max_allowed_packet for Mysql is 1 GB from the following link,
http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html



Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30370
    
150

Keep in mind that there are other limits you may care about such as the number of elements in the "in clause" or the number of where clause elements.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
Consider Paul's rocket mass heater.
 
subject: Max length of select statement