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

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -