MySQL Like statement in SELECT column_name
database, mysql, sql
Solution
For the LIKE you have to add a wildcard %, so:
SELECT
column_name
FROM
information_schema.columns
WHERE
table_name='lime_survey_98673'
AND column_name LIKE '98673%'
Problem
I am trying to select the column names from a specific table, where the table name is like '98673' So I am using this: ``` SELECT column_name FROM information_schema.columns WHERE table_name='lime_survey_98673' AND column_name LIKE '98673' ``` However this will not result in any data. Though I do have column names with '98673Blah' in there. I know I must be doing something wrong, but what??