-2

I need to make some test cases for Oracle packages. I have a package which has store procedures, some of them are selects. Each Store procedure has"Exception" (try - catch) My question is: How Can i provoke an error when calling a store procedure that only contains a "select" ? any suggestion?

thanks all in advance ..

  • 1
    Will any error do? Or do you want specific errors to be thrown for different test cases? Please include more details as currently the question is very vague. – Vampiro Jan 10 '16 at 19:58
  • You may want to check [RAISE_APPLICATION_ERROR](http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/errors.htm#i1871) ... and please post your simplified code - a **procedure can't contain only select**, there must be at least a BEGIN - END block. – Marmite Bomber Jan 10 '16 at 20:02

1 Answers1

0

Drop or rename the tables which are being accessed by the SELECT using

DROP TABLE YOUR_TABLE

or

RENAME YOUR_TABLE TO YOUR_RENAMED_TABLE

Best of luck.