What occurs when more than one Account is returned by the SOQL query?
Given the following Apex statement:
Account myAccount = [SELECT Id, Name FROM Account];
What occurs when more than one Account is returned by the SOQL query?
A . The variable, myAccount, is automatically cast to the List data type.
B . The first Account returned is assigned to myAccount.
C . The query fails and an error is written to the debug log.
D . An unhandled exception is thrown and the code terminates.
Answer: D
Latest PDI Practice Questions with 191 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations
Subscribe
Login
0 Comments