SQL: Using the LIKE Operator

SELECT <column1_name>, <column2_name>,..., <columnx_name>
FROM <table_name>
WHERE <columnN> LIKE pattern;
SELECT first_name, last_name, phone_number
FROM clients_table
WHERE phone_number LIKE pattern
SELECT first_name, last_name, phone_number
FROM clients_table
WHERE phone_number LIKE '(917)%'
SELECT title, author_fname, author_lname
FROM books
WHERE author_fname = 'Malcolm' AND author_lname LIKE '%bach'

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store