Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is a "leaf expression"?

Partition-clause expressions are limited in the following ways:
    Your partition-clause must calculate a single non-null value for each row. You can reference multiple columns, but each row must return a single value.
    You can specify leaf expressions, functions, and operators in the partition clause expression.
    All leaf expressions in the partition clause must be either constants or columns of the table.


share|improve this question
I guess it means "leaf" as when after parsed by the parser and translated into a parse tree – ypercubeᵀᴹ Nov 4 '13 at 15:49
If my assumption is correct, this forbids the use of some functions, like CURRENT_TIMESTAMP() and RANDOM() – ypercubeᵀᴹ Nov 4 '13 at 15:57

I'm pretty sure leaf expression means something like "a?b:c". A discrete value from a conditional.

But basically the overall message is saying you need to avoid null values. They can't partition on a null.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.