Not a part of the SQL standard, but would PostgreSQL enumerated types be what you're thinking of?
https://www.postgresql.org/docs/current/datatype-enum.html
Although I guess the question is are you thinking sum types at the attribute level or sum types at the relation level? At the relation level I'm not familiar with an answer, but I can see where that would be a nice database-level solution for polymorphic associations.