How do you delete a row that contains a certain value from a specific column across all tables in a database? I'm trying to create a query that searches the database for tables that have the column "GtNumber" that has a row numeric value of "2". I want to then remove these rows so that there are no rows within the database that contain a value of 2 for GtNumber.

Is there any way to get this all done with one query?
I don't think there is a way to do it with a single query but you could query the system tables for any table that has that column name and then use that to create the delete scripts for you.

Select from those tables:

select 'select * from ' + t.name + ' where GtNumber = 2' 
from sys.tables t inner join sys.columns c on t.object_id=c.object_id
where c.name='GtNumber'


Delete from those tables:

select 'delete from ' + t.name + ' where GtNumber = 2' 
from sys.tables t inner join sys.columns c on t.object_id=c.object_id
where c.name='GtNumber'