Loading tutorials
SELECT and FROM, and the rules that decide whether a query compiles and returns what you expect.5 min readWHERE clause decides which rows a SOQL query returns. Without it, a query returns every record the user can see, up to the limits covered in a later chapter. This chapter covers the filter operators, how to combine conditions, how null values behave, and the mistakes that cause empty results o5 min readSELECT, FROM, and WHERE, and that you know how Apex lists and bind variables work. It covers the three clauses that shape which rows come back and in what order: ORDER BY, LIMIT, and OFFSET.4 min readInteger, or a list of AggregateResult rows. Each shape fails in its own way. This chapter covers the failures that production code hits most often, and how to avoid them.5 min readWHERE clause and a bind variable, and that you know the difference between the Date and Datetime types in Apex. It builds on filtering with WHERE and covers how to filter on date and time fields without hard-coding dates.4 min readList of sObjects, and cast values in Apex. You should also know that queries count against governor limits.5 min readList<Account> and a single `Accou5 min readQueryException that a failed query throws. It covers how to make a query respect the running user's permissions, because Apex does not do that by default.4 min read