Sanke
Sanke

Reputation: 746

Maximum number or characters per select statement

What is the maximum number of characters that can be used in a SQL statement in oracle?

Upvotes: 0

Views: 257

Answers (2)

APC
APC

Reputation: 146349

The Oracle documentation doesn't give a maximum length for a SQL query. Check this here.

This is because the physical limit depends on the OS of the database server. Suffice to say the actual limit will be way bigger than any practical query you could write (or even generate).

There used to be a practical limit for EXECUTE IMMEDIATE of 32767 because that's the limit of a PL/SQL varchar2 variable. But these days we can feed EXECUTE IMMEDIATE with much larger statements using clob. Still doesn't mean we should :)

Upvotes: 4

user2736738
user2736738

Reputation: 30936

It depends on many things like space in disk and memory etc. But yes you shouldn't put large data in a query. It's not a good option.

Normally following what I said it doesn't require huge characters in the query, which might make you ask this question.

Upvotes: 0

Related Questions