What query can I run on a database that will tell me which tables in that database have a column named "RCPTNMBR"?
Most databases support this:
SELECT
table_name
FROM
information_schema.columns
WHERE
column_name = 'x'
Give this a try
SELECT t.name as TableName, c.name as ColumnName
FROM sys.tables t
JOIN sys.columns c ON t.object_id = c.object_id
WHERE c.name = 'RCPTNMBR'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With