Get domain name from Email in Oracle SQL

How to get domain name from given email id in Oracle SQL (or) PL/SQL Very easy to get domain name from mail id like ‘thamaraiapex@gmail.com’ =>¬†gmail SELECT (substr(substr(‘thamaraiapex@gmail.com’, instr(‘thamaraiapex@gmail.com’, ‘@’) + 1), 1, instr(substr(‘thamaraiapex@gmail.com’, instr(‘thamaraiapex@gmail.com’, ‘@’) + 1), ‘.’) – 1)) as domain_name FROM dual; Result:- gmail Continue reading Get domain name from Email in Oracle SQL