Say we have the following TASKS exists in DEMO_DB database. As we can see 5 TASKS are related to the PHARMA project while other are related to XEROX project.
Our requirement is we want to drop the TASKS belongs to PHARMA only. We have developed the below procedure where we are extracting TASK List belongs to PHARMA only.
show tasks like ‘PHARMA%’;
Now will use the below function to fetch the result of previous executed query.
Now execute the Proc and verify the results:
Verify whether TASKS has been dropped or not.
Now TASKS dropped successfully from the system without no manual intervention.