Q:

Write a PL/SQL block to insert data to a table using character type variable

0

Write a PL/SQL block to insert data to a table using character type variable.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

PL/SQL Code:

DROP TABLE test;
CREATE TABLE test (col1 CHAR(5));
 
DECLARE
  var1 VARCHAR2(5 CHAR) := 'abc ';
BEGIN
  INSERT INTO test(col1) VALUES(var1);
END;
/

Sample Output:

PL/SQL procedure successfully completed.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now