I have a list of all column names to be dropped from multiple tables in a schema, but not all the column names in the list have it's presence in all the tables.
For the schema and the table name I have can I in a single query do a check if the columns match the column names in the list just drop that
Say the column list to drop is
Drop_col = ['AB',' BC', FG', 'TR']
But my TABLE1 has only 'BC', 'TR' in the column list
Query = ALTER TABLE SCHEMA_NAME.TABLE1 DROP COLUMN IN ({Drop}).format (Drop = Drop_col)
Something Like this?? or any other suggestions ??