coderina
coderina

Reputation: 1746

How to execute bind variables in pl/sql?

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?

Upvotes: 0

Views: 376

Answers (1)

Littlefoot
Littlefoot

Reputation: 142713

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.

Upvotes: 1

Related Questions