Ask Question

Display SupplierID and Phone of suppliers whose phone number, including area code, contains two and only two '0's. For example, supplier 11 should not appear in the output because its phone number (010) 9984510 contains three '0's.

Hint 1: correct output has three suppliers.

Hint 2: considering two LIKE operators.

Tables: Products, Categories, Suppliers

+4
Answers (1)
  1. 22 August, 04:25
    0
    Answer explained below

    Explanation:

    since there is no table showing the columns, i will consider mobile as phone number and id as supplier id and code as area code.

    the query is as follows

    select id, mobile from suppliers where mobile like '%0%0%' and code like '%0%0%'.

    here we have used two like operators i. e one for mobile and one for area code.

    '%0%0%' means that the number should contain two zeros and positions can be wherever in the number.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Display SupplierID and Phone of suppliers whose phone number, including area code, contains two and only two '0's. For example, supplier 11 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers