Skip to Main Content


Question and Answer

Chris Saxon

Thanks for the question, Dusko.

Asked: January 25, 2023 - 11:08 pm UTC

Last updated: January 26, 2023 - 1:36 pm UTC

Version: oracle live sql

Viewed 100+ times

You Asked

Dear Tom,

how can I create bind variable in Oracle Live SQL,

<variable variable_name data_type;>

example <variable dusko number;> 

just doesn't work, i get "Ussuported command" message...

Thanks and best regards

with LiveSQL Test Case:

and Chris said...

Well, as the output says, these are unsupported!

Note that PL/SQL variables in SQL are bind variables. So depending on what you're trying to do you can "use bind variables" by placing the query in a PL/SQL block.

For example:
  var int;
  select ...
  where  col = var;

In this instance, VAR is a bind variable for the query. If you explain in more detail why you want to use bind variables we may be able to help with other options.

In general - if you have comments or suggestions for Live SQL, please use the feedback option on that site.

More to Explore


The Oracle documentation contains a complete SQL reference.