mail-id table contains two columns(email_id,userid)
it contains different types of mail-ids,and no of users.
here username length is differ na,(ex-
tamil@yahoo.com,joshua@hotmail.com like)
now i want to fetch the email-ids only starting from '@'
(ex-@gmail.com,@yahoo.com,@hotmail.com

Answer Posted / raji_4u

select substr(mail_id,instr(mail_id,'@',1)) from table_name

This works fine.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the working of primary key?

600


What is having clause in sql?

520


what is the different between now() and current_date()? : Sql dba

518


How do you define a foreign key?

528


Why functions are used in sql?

509






What is bind reference and how can it be created?

570


What is meant by cursor in sql?

536


how to fetch common records from two tables? : Sql dba

617


what are the differences between char and varchar? : Sql dba

517


How to run sql commands in sql*plus?

578


How to get each name only once from an employee table?

602


Can we use insert statement in function?

512


What is orm in sql?

531


What is the difference between truncate and drop statements?

571


What is the basic form of sql query?

486