Archive

Posts Tagged ‘oracle db’

Check when deleting, inserting or updating in trigger oracle db

June 6, 2016 Leave a comment

— Inside your trigger

IF DELETING THEN
— do your thing when deleting
END IF;

IF INSERTING THEN
— do your thing when inserting
END IF;

IF UPDATING THEN
— do your thing when updating
END IF;

Categories: Mini-tips, Oracle, plsql, SQL, Tips

Simple grant/revoke select on view Oracle DB

May 17, 2016 Leave a comment

grant select on my_schema.my_new_view to schema_that_will_see_it;
commit;

revoke select on my_schema.my_new_view from schema_that_will_see_it;
commit;

Query to know what changed in your database objects

January 18, 2016 Leave a comment

select last_ddl_time, object_name, object_type
from dba_objects
where last_ddl_time is not null
order by 1 desc;