aspose file tools
The moose likes JDBC and the fly likes Max length of select statement Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply 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: 26173
    
  66

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Max length of select statement
 
Similar Threads
statement Vs prepared statement for ordinary select queries
Database question???
defference jdbcTemplate.queryForInt() and others
JDBC and Stored Procedure
Trying to extract text portion of select statement entry