What does the query return if there is no Contact with the last name ‘Smith’?

A developer has the following query: Contact c = [SELECT id, firstname, lastname, email FROM Contact WHERE lastname = ‘Smith’];

What does the query return if there is no Contact with the last name ‘Smith’?
A . A contact initialized to null.
B . An error that no rows are found.
C . An empty List of Contacts.
D . A Contact with empty values.

Answer: B

Latest CRT-450 Practice Questions with 372 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
0 Comments