-- works
drop domain if exists email_dom;
-- works
create domain if not exists email_dom as varchar2(100)
constraint email_chk check (regexp_like (email_dom, '^(\S+)\@(\S+)\.(\S+)$'));
-- EDIT: this actually works
select domain_check('email_dom', 'grape@fruit.com') good,
domain_check('email_dom', 'grape') bad,
domain_check('email_dom', cast('grape@fruit.com' as email_dom) ) ugly;
Actual Questions
- ~where is my typo?~
- ignore this. i found my “missing right parenthesis”
- How would I ad hoc
domain_check a multi column domain?
Rhetorical questions showing areas of improvement for **domain**
- why do I need to
cast a value when the domain name is already given?
- why is the domain name not a required parameter for
domain_order and domain_display?