SQL SERVER – Query to Find Column From All Tables of Database

One question came up just a day ago while I was writing SQL SERVER – 2005 – Difference Between INTERSECT and INNER JOIN – INTERSECT vs. INNER JOIN. How many tables in database AdventureWorks have column name like ‘EmployeeID’? It was quite an interesting question and I thought if there…
Read More

SQL SERVER – mssqlsystemresource – Resource Database

Just a day ago I received following email “Dear Pinal, While I was exploring my computer in directory C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data I have found database mssqlsystemresource. What is mssqlsystemresource? Thanks, Joseph Kazeka” Simple question like this are very interesting. mssqlsystemresource is Resource Database. It is read only database and…
Read More

SQL SERVER – 2005 – Find Tables With Foreign Key Constraint in Database – Part 2

What I love most about this blog is active readers participation. If readers are becoming contributor is the true success for any blog or online community. Recently many readers have contributed their suggestions and script to this blog. Joffery has provided nice script which is modification to previous article of…
Read More

SQL SERVER – Find Table in Every Database of SQL Server – Part 2

Yesterday I wrote about SQL SERVER – Find Table in Every Database of SQL Server. Today we will see another method how we can achieve the same result using Information_Schema view. Refer my previous article here for additional information. CREATE PROCEDURE usp_FindTableNameInAllDatabase @TableName VARCHAR(256) AS DECLARE @DBName VARCHAR(256) DECLARE @varSQL…
Read More
Exit mobile version