Most of the examples online are about select * bulk collect ...
I have a script that grants synonyms and it takes too long to fetch data from the cursor, so I was planning to use bulk collect. The original cursor and the fetch:
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To start with
vUserandvObjectNameshould be collections of strings, not rowtypes on cursors. Or a single variable likevRowthat is the rowtype of the cursor, and then access the members of the rowvRow(indx).grantee.If you are not going to use a
limitclause on thefetch bulk intothen you only need one loop, just on the collection, since everything will be grabbed at once.