Created
December 8, 2010 20:27
-
-
Save DoubleBrotherProgrammer/733857 to your computer and use it in GitHub Desktop.
How to find all database tables whose names end in an UPPERCASE X, using tsql
This file contains 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
-- Give me all tables ending with an UPPERCASE X | |
SELECT table_name, SUBSTRING( table_name, LEN(table_name), 1 ) as 'end' | |
FROM INFORMATION_SCHEMA.TABLES | |
-- SELECT ascii('X') = 88 | |
-- SELECT ascii('x') = 120 | |
WHERE ASCII( SUBSTRING( table_name, LEN(table_name), 1 ) ) = 88 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment