Which WHERE clause is correct?

A developer wants to create a Java Persistence query that returns valid U.S. phone numbers
(formatted as “123-456-7890” or “800-RUN-EJB3”) 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 U.S. phone numbers
(formatted as “123-456-7890” or “800-RUN-EJB3”) 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-%-%’

E.
WHERE addr.phone LIKE ‘303-___-____’

F.
WHERE addr.phone LIKE ‘303-%%%-%%%%’



Leave a Reply 0

Your email address will not be published. Required fields are marked *