This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 30057
    
149

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Max length of select statement
 
Similar Threads
Trying to extract text portion of select statement entry
statement Vs prepared statement for ordinary select queries
JDBC and Stored Procedure
Database question???
defference jdbcTemplate.queryForInt() and others