Table Belongs To Which Database In SQL Server

DBA can you please check table schema in server XYZ? Every time application guys ask same question. You can always  ask these people for more info, but if client is asking on you desk below query might be useful

/*******Table belongs to which database in SQL server********/
SELECT *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND TABLE_NAME = 'table_name'



No comments:

Post a Comment