https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm
Bind variable used in database.query makes use of :variablename format
Needs to be local as seen in the example given.
A and D is correct:
"You can use simple bind variables in dynamic SOQL query strings when using Database.query"
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm
A and D is correct.
1. You can use simple bind variables in dynamic SOQL query strings when using Database.query'
2. However, unlike inline SOQL, you can’t use bind variable fields in the query string with Database.quer
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm
For answers A/B: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_dynamic_soql.htm
For C/D: I don't have a reference, but as seen, the variables used in the example are not public or global but they do reside in the same class, hence, local. I can't find a better definition for 'local'.
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
code_breaker_27
1 year, 2 months agoiValRV
1 year, 7 months agoDev_Bond_ZA
1 year, 9 months agoDev_Bond_ZA
1 year, 9 months agothneeb
1 year, 9 months agolorenac2
1 year, 10 months ago