Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL
Is there a maximum length (limit) for a SQL statement?
 
I Tried to Execute a Query as follows
 
INSERT INTO (name,description) VALUES('xxxx','description text')
 
here i have given the description text having character of 2000000.
 
While executing the SQL statement via my C# code is Throws an Exception "SystemOutofMemory".
 
Can anyone help me or Explain me what could be the cast of it please.
 
and the description column is VARCHAR(MAX) allows NULL.
 
Thanks in Advance.
Posted 22-Jan-13 20:40pm
Comments
Sergey Alexandrovich Kryukov at 23-Jan-13 2:44am
   
What makes you think that this is related to the limitation of the statement size? It seems to be totally illogical. This is not a bottleneck. —SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is, as always, implementation-dependent. Use manufacturer documentation; this information may or may not be available. I cannot imaging that it could be a bottleneck, so I won't be surprised if you could not find it.
 
—SA
  Permalink  
Comments
Peter Felix A at 24-Jan-13 2:39am
   
I Written a Sql statement containing 168034 lines in it when i try to execute it says "System out of Memory Exception" Cannot Execute script. What can be the cause of it then?
Sergey Alexandrovich Kryukov at 24-Jan-13 2:46am
   
I see, but may be these lines is not the immediate reason for it. It could be parsed successfully, but further processing may deplete memory. I think you are digging in wrong direction... —SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 545
1 Dnyaneshwar@Pune 500
2 ravikhoda 325
3 OriginalGriff 277
4 Damith Weerasinghe 265
0 Sergey Alexandrovich Kryukov 10,974
1 OriginalGriff 6,777
2 Peter Leow 4,785
3 Abhinav S 3,813
4 Maciej Los 3,575


Advertise | Privacy | Mobile
Web03 | 2.8.140421.2 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid