I was wondering if it were possible to write a query that would return all field with value 10345 from all tables from the DB. The field 10345 is in column title systemassignid. I have wrote this code who select all the column with systemAssignID but i need narrow it the field = 10345 not the column.
--this code return only the column not the field = 10345.--
SELECT COLUMN_NAME, TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%SystemAssignId%'
Thanks for any help.
Aucun commentaire:
Enregistrer un commentaire