The following are the actions I want to do.
SQL statement that returns a complete list of tables with a specific column name
SELECT TABLE_NAME FROM information_schema.COLUMNS where COLUMN_NAME = 'The name of the column you want to find'
But I can't use it like this.
DELETE (sentence above) where column name = erasure value
The problem is that there is no variable in the place where the table name should be
I'd appreciate it if you could share your know-how.
mssql sql
Turn the procedure for loop to check if each table has a corresponding column,
Wouldn't it be possible to delete it if there is?
© 2024 OneMinuteCode. All rights reserved.