Created
August 9, 2013 20:01
-
-
Save martinusso/6196711 to your computer and use it in GitHub Desktop.
select domains - Firebird
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
SELECT | |
RDB$FIELDS.RDB$FIELD_NAME | |
FROM | |
RDB$FIELDS | |
INNER JOIN RDB$RELATION_FIELDS | |
ON (RDB$RELATION_FIELDS.RDB$FIELD_SOURCE = RDB$FIELDS.RDB$FIELD_NAME) | |
WHERE | |
RDB$FIELDS.RDB$SYSTEM_FLAG = 0 | |
GROUP BY | |
RDB$FIELDS.RDB$FIELD_NAME | |
-- with the code below we have unused domains | |
HAVING | |
COUNT(RDB$RELATION_FIELDS.RDB$FIELD_SOURCE) = 0 | |
-- with the code below we have used domains | |
HAVING | |
COUNT(RDB$RELATION_FIELDS.RDB$FIELD_SOURCE) > 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Obs no unused alter left join