0

I was learning about bind variables in pl/sql and tried to execute the following code on oracle 10g database

VARIABLE v_bind1 VARCHAR2(10);
EXEC :v_bind1:='shweta';

when i executed it, one pop-up asking for bind variable came as shown in the picture screenshot of pop up box

Then I entered the value 'shweta' in it and submitted, but it shows invalid sql statement.

what should I enter in the pop-up box, so that my program execute successfully?

coderina
  • 1,583
  • 13
  • 22
  • This behaviour seems to be coming from some web-based app development tool, not PL/SQL the programming language. It looks like the tool doesn't emulate SQL\*Plus `variable`, `exec` or bind variable syntax. – William Robertson Feb 24 '19 at 22:41

1 Answers1

1

Well, you use Apex SQL Workshop, its ancient version (2.1) which dates in January 2006, was part of 10g Express Edition database. I never thought that someone might still be using it. Upgrade to at least 11gXE, it is free.

I suggest you test your skills in SQL*Plus instead because responses you get from tool you chose might be misleading.

Littlefoot
  • 131,892
  • 15
  • 35
  • 57