2

Does anyone can tell me if is there any chars limit for a query?

I'm wondering cause I need to build up a big routine query and not sure if the query should have a chars limit.

i'm using : MySQL latest version , Apache 2, and PHP

Andrew
  • 26,629
  • 5
  • 63
  • 86
itsme
  • 48,972
  • 96
  • 224
  • 345
  • 4
    It depends on the database. What database and version? – Mark Byers Nov 12 '12 at 12:32
  • Which RDBMS, and what do you use to connect to your database? MS-SQL-Server through ADO.NET? etc? – MatBailie Nov 12 '12 at 12:32
  • @MarkByers. It's very unlikely to exists no matter the database. – gdoron Nov 12 '12 at 12:36
  • @gdoron : it does exist for SQL Server, it's large, but there is a physical limit related to network packet size see http://stackoverflow.com/questions/1869753/maximum-size-for-a-sql-server-query-in-clause-is-there-a-better-approach – Andrew Nov 12 '12 at 12:50
  • @Andrew. I must know, what is the limit? My guess is: too big for yo to care... – gdoron Nov 12 '12 at 12:51

1 Answers1

2

Here's a couple good articles I found on the subject. The second article is actually referred to in the first article.

Maximum length of MySQL query? http://bytes.com/topic/php/answers/8519-maximum-length-mysql-query

Packet too Large - MySQL http://www.devshed.com/c/a/MySQL/Troubleshooting-Problems-with-MySQL-Programs/4/

Tom
  • 6,593
  • 3
  • 21
  • 42