A developer wants to create a Java Persistence query that returns valid US phone numbers (formatted as 123-456-7890) from a collection of differently formatted international phone numbers. The developer needs only those numbers that begin with 303. Which WHERE clause is correct?

A developer wants to create a Java Persistence query that returns valid US phone numbers (formatted as 123-456-7890) from a collection of differently formatted international phone numbers. The developer needs only those numbers that begin with 303. Which WHERE clause is correct?




a. WHERE addr.phone LIKE '303_'
b. WHERE addr.phone LIKE '303%'
c. WHERE addr.phone LIKE '303-%-%'
d. WHERE addr.phone LIKE '303-___-____'






Answer: D


Learn More :