Skip to content
Advertisement

Can I declare and use variables “inline” in Oracle SQL?

can I do something like this pseudo code and use variables inline within the select? I know that in this case variables are not needed, I have a more complex use case in mind.

cheers

Advertisement

Answer

No, Oracle does not support your syntax:

The full syntax for the SELECT statement is documented here and that syntax is not included. Particularly:

SELECT syntax:

SELECT syntax

select_list syntax:

select_list syntax

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement