sql - how to select sepecific email domain from email column -


i have cust_tbl 1 of column email , user_id.

i have many records in cust_tbl, want show record have specific email domain (like @gmail.com) , user user_id = 'sysadmin1'.

i have tried query

select substr(email,instr(email,'@gmail.com'))   corp_usr  user_id = 'sysadmin1'; 

but shows email column (i want column filter) , still shows email that's not @gmail.com

what correct query this?

just use instr() in where clause :

select *  corp_usr  user_id = 'sysadmin1'   , instr(email,'@gmail.com') > 0; 

Comments

Popular posts from this blog

ruby on rails - ActiveRecord order not working -

java - AEM: 403 Forbidden occurs when call a Post servlet -

How to embed a map into Netlogo using GIS extension? -