I am trying to select all tables that do not have column named ‘unique’. I can select all tables that have it using:
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME = 'unique'
AND TABLE_SCHEMA ='database';
Is there a simple way to modify the SELECT statement so it lists all tables that do not have that column? This seems like it would be simple, but I can’t figure it out, and can’t find an answer on the forum.
Thanks
1 Answer