DEFINE TEMP_ID = 1004; SELECT * FROM FORMATS WHERE FRMT_ID = &TEMP_ID; 

Why does it work fine on the sql plus command line, and when in plsql Developer I select this text in the SQL window, press F8 to execute, it jumps out a window that offers to write out the value of the TEMP_ID variable? In this case, no error displays. The presence or absence of the sign ';' at the end of the line does not affect anything.

  • And if you remove & ? - Anton Shchyrov
  • And publish the original text of the error along with its code - Anton Shchyrov
  • Try pressing F5 instead of F8 ... - MaxU
  • @AntonShchyrov there is no error, the input form pops up. - Vitaly Yandulov

1 answer 1

Define is a SQLPlus command. PL\SQL Developer does not support it for windows of type sql window . If you simply delete the line with the definition ( DEFINE temp_id = 1004; ) then the developer will show a window with a suggestion to enter the value of the variable.

You can also change the window to the command window , your example will work in it.

  • Obviously, it’s a pity. It turns out that you’ll have to do it on plsql. - Vitaly Jandulov