find how many table doesn 27t contain column in mysql

Solutions on MaxInterview for find how many table doesn 27t contain column in mysql by the best coders in the world

showing results for - "find how many table doesn 27t contain column in mysql"
Iker
02 Jan 2017
1select
2t.*
3from INFORMATION_SCHEMA.TABLES as t
4    left join INFORMATION_SCHEMA.COLUMNS as c
5    on c.TABLE_NAME = t.TABLE_NAME
6    and c.TABLE_SCHEMA = t.TABLE_SCHEMA
7    and c.COLUMN_NAME = 'unique'
8where c.COLUMN_NAME is null
9and t.TABLE_SCHEMA = 'database'