Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, John.
Asked: May 02, 2018 - 5:58 pm UTC
Last updated: May 03, 2018 - 4:07 am UTC
Version: 12.03
Viewed 1000+ times
SQL> create table t ( x int ); Table created. SQL> SQL> create or replace 2 procedure p is 3 begin 4 insert into t values (1); 5 end; 6 / Procedure created. SQL> SQL> select object_name, status, last_ddl_time 2 from user_Objects 3 where object_name in ('T','P'); OBJECT_NAME STATUS LAST_DDL_TIME ---------------------------------------- ------- ------------------- P VALID 03/05/2018 12:03:02 T VALID 03/05/2018 12:03:02 2 rows selected. SQL> drop table t purge; Table dropped. SQL> SQL> select object_name, status, last_ddl_time 2 from user_Objects 3 where object_name in ('T','P'); OBJECT_NAME STATUS LAST_DDL_TIME ---------------------------------------- ------- ------------------- P INVALID 03/05/2018 12:03:02 1 row selected. SQL> alter procedure p compile; Warning: Procedure altered with compilation errors. SQL> SQL> select object_name, status, last_ddl_time 2 from user_Objects 3 where object_name in ('T','P'); OBJECT_NAME STATUS LAST_DDL_TIME ---------------------------------------- ------- ------------------- P INVALID 03/05/2018 12:03:27 1 row selected. SQL> alter procedure p compile debug; Warning: Procedure altered with compilation errors. SQL> sho err Errors for PROCEDURE P: LINE/COL ERROR -------- ---------------------------------------------------------------- 3/3 PL/SQL: SQL Statement ignored 3/15 PL/SQL: ORA-00942: table or view does not exist SQL> select object_name, status, last_ddl_time 2 from user_Objects 3 where object_name in ('T','P'); OBJECT_NAME STATUS LAST_DDL_TIME ---------------------------------------- ------- ------------------- P INVALID 03/05/2018 12:03:44 1 row selected. SQL> create table t ( x int ); Table created. SQL> SQL> exec p PL/SQL procedure successfully completed. SQL> SQL> select object_name, status, last_ddl_time 2 from user_Objects 3 where object_name in ('T','P'); OBJECT_NAME STATUS LAST_DDL_TIME ---------------------------------------- ------- ------------------- P VALID 03/05/2018 12:04:20 T VALID 03/05/2018 12:04:20 2 rows selected. SQL> SQL> alter procedure p compile debug; Procedure altered. SQL> SQL> select object_name, status, last_ddl_time 2 from user_Objects 3 where object_name in ('T','P'); OBJECT_NAME STATUS LAST_DDL_TIME ---------------------------------------- ------- ------------------- P VALID 03/05/2018 12:04:30 T VALID 03/05/2018 12:04:20 2 rows selected. SQL>
The Oracle documentation contains a complete SQL reference.