PL/Sql Interview Questions

1) We have a table called tab_1 with few number of records in it, now if we execute the following block then what clause would replace the commented section so that it would display "0":

DECLARE
lv_var INTEGER;
BEGIN
DELETE FROM tab_1;
/*commented section*/
SELECT COUNT(*) into lv_var FROM tab_1;
DBMS_OUTPUT.PUT_LINE(lv_var);
END;
/

2) What would be output of the following block:

DECLARE
" " VARCHAR2(10) := 'All is well.';
BEGIN
DBMS_OUTPUT.PUT_LINE(" ");
END;
/

3) Does it look correct to you:

DECLARE
"**********" VARCHAR2(10) := 'All is well.';
BEGIN
DBMS_OUTPUT.PUT_LINE(""**********");
END;
/

0 comments:

Post a Comment

 
geekarticles.blogspot.com. Powered by Blogger.