Skip to content

Instantly share code, notes, and snippets.

@tojibon

tojibon/mysql.md

Last active May 9, 2019
Embed
What would you like to do?
Search for a specific column name in all the tables in MySQL database?
SELECT    
    table_name, 
    ordinal_position    
FROM INFORMATION_SCHEMA.COLUMNS    
WHERE    
    table_schema = 'DB_NAME' AND    
    column_name='column_name';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment