Created
April 29, 2021 14:43
-
-
Save pwelter34/196edc6b2e78dd8ff108ba609dfb26f0 to your computer and use it in GitHub Desktop.
SQL Server Schema Search
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @tableName NVARCHAR(256) | |
DECLARE @tableSchema NVARCHAR(100) | |
DECLARE @columnName NVARCHAR(256) | |
SET @tableName = '%CaseManager%' | |
SET @tableSchema = 'dbo' | |
SET @columnName = '%%' | |
SELECT * | |
FROM INFORMATION_SCHEMA.Columns | |
WHERE TABLE_NAME LIKE @tableName | |
AND COLUMN_NAME LIKE @columnName | |
AND TABLE_SCHEMA = @tableSchema |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @routineName NVARCHAR(256) | |
SET @routineName = '%%' | |
SELECT * | |
FROM INFORMATION_SCHEMA.ROUTINES | |
WHERE ROUTINE_NAME LIKE @routineName |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @tableName NVARCHAR(100) | |
DECLARE @tableSchema NVARCHAR(100) | |
SET @tableName = '%%' | |
SET @tableSchema = 'dbo' | |
SELECT * | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_NAME LIKE @tableName | |
AND TABLE_SCHEMA = @tableSchema |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment