Hi I am getting the error, need advise. The code is:
VARIABLE v_bind1 VARCHAR2(10); --declare bind variable
exec : v_bind1 := 'RebellionRider'; --execute it
SET SERVEROUTPUT ON;
BEGIN
dbms_output.put_line(v_bind1);
END;
It prints the below output when m trying to declare the variable:
Usage: VAR[IABLE] [ <variable> [ NUMBER | CHAR | CHAR (n [CHAR|BYTE]) |
VARCHAR2 (n [CHAR|BYTE]) | NCHAR | NCHAR (n) |
NVARCHAR2 (n) | CLOB | NCLOB | BLOB | BFILE
REFCURSOR | BINARY_FLOAT | BINARY_DOUBLE ] ]
and when tried to print it, it shows below error:
SP2-0552: Bind variable "V_BIND1" not declared.
exec v_bind1 := 'RebellionRider';Also the value that you are assigning to the variable is more than ten characters.