in reply to Re: Throw DB error
in thread Throw DB error

Rather than locking a table (very unusual in Oracle), you can try simply misspelling a column name in your SQL statement. Oracle's compiler will throw an error for that.
select fred from global_name * ERROR at line 1: ORA-00904: "FRED": invalid identifier

Replies are listed 'Best First'.
Re^3: Throw DB error
by Bheema_Tyco (Novice) on Mar 03, 2010 at 05:57 UTC

    Thanks for your reply. But i thing is, my code has to run for some extent then it has to throw DB error. So that only i can test my code for particular case. Tell me how can i throw db error at somewhere middle in the code

    By Bheema