Max length of a query string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am wondering, is there any limitation for the length of a query string?

Thanks,

Lubomir
 
Used to be 256 characters, but I am not sure whether that still is the
limit, or not.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 
It's 64K * Network Packet size which defaults to 4K. I think it's been 64K
(at least) for some time now. A limit of 256 means that you would have some
difficulty building an INSERT or UPDATE statement that had lots of strings
or a SP of any size at all...
See
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/13e95046-0e76-4604-b561-d1a74dd824d7.htm


--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
 
Thanks, that's long enough :-)

Lubomir



William (Bill) Vaughn said:
It's 64K * Network Packet size which defaults to 4K. I think it's been 64K
(at least) for some time now. A limit of 256 means that you would have some
difficulty building an INSERT or UPDATE statement that had lots of strings
or a SP of any size at all...
See
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/instsql9/html/13e95046-0e76-4604-b561-d1a74dd824d7.htm


--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
 
I was thinking query string, as in web browser and not a sql query. Funny
how your brain sees things differently depending on what kind of work you
are doing. Thanks Bill.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 
Hi,

I am wondering, is there any limitation for the length of a query string?

Thanks,

Lubomir

The maximum querystring length seems to be depend on a number of factors,
such as the brower and its version. For instance, IE seems to have a
maximum URL length if 2083 characers, so you have to subtract the domain,
protocol etc to get the usable query string length.

I'd say a good ballpark figure is about 2000 characters
 
Ah, no. We're not talking about URLs here but SQL queries.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
 
Back
Top