You need to sign in to do that
Don't have an account?
harita boyina
in how many ways we write soql quries in apex
in how many ways we write soql quries in apex
can get the answer immediately
can get the answer immediately
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Example 1
SELECT Id FROM Contact WHERE Id In ('00Q6000000nuyL2EAI','00Q6000000iyBBhEAM','00Q6000000j007MEAQ')
Example 2
SELECT Id FROM Lead WHERE Email != ' '
This one is a trick. Email is an indexed field on Lead but if you look at my WHERE clause, this is going to return darn near all the Leads. So, I didn't reduce this record set by much and thus this reverts to a 'non-selective' query.
SELECT Id FROM Lead WHERE Email != ' ' and Status = 'Open' and OwnerId in ('005d0000001btXoAAI', '005d0000002X1AqAAK')
Go through this once u can get an idea-https://developer.salesforce.com/page/A_Deeper_look_at_SOQL_and_Relationship_Queries_on_Force.com
Refer this links,
https://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_SOQL_variables.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_SOQL.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_soql.htm
Thanks