È più simile a
WHERE column_name LIKE 'column name'
Poiché usa LIKE , puoi inserire modelli di caratteri jolly nel parametro, ad es.
SHOW COLUMNS FROM table LIKE '%id'
troverà tutte le colonne che terminano con id .
Se non ci sono caratteri jolly, allora LIKE è equivalente a = .
Se non vuoi usare LIKE , puoi usare WHERE :
SHOW COLUMNS FROM table WHERE field = 'column name';
In SHOW COLUMNS output, il field colonna contiene i nomi delle colonne. Il WHERE la clausola consente anche di testare altri attributi, ad es.
SHOW COLUMNS FROM table WHERE type LIKE 'varchar%'
troverà tutti i VARCHAR colonne.