Multiple choice technology databases

John has created a procedure named SALARY_CALC. Which SQL query allow him to view text of procedure?

  1. SELECT text FROM user_source WHERE name = 'SALARY_CALC';

  2. SELECT * FROM user_source WHERE name='SALARY_CALC';

  3. SELECT * FROM user_objects WHERE object_name='SALARY_CALC';

  4. SELECT * FROM user_procedures WHERE object_name='SALARY_CALC';

  5. SELECT text FROM user_source WHERE name='SALARY_CALC' and owner='JOHN'

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

To view the source code text of a stored procedure in Oracle, you query the 'text' column of the 'user_source' data dictionary view where the 'name' matches the procedure name in uppercase.