--Que-4)Create a Query to pull all emails that contains
--characters +,^,*,&,!

create table mail3(email varchar(50))
insert into mail3 values('mansi.sharma@yahoo.co.in')
insert into mail3 values('mansi.sharma+yahoo.co.in')
insert into mail3 values('mansi.sharma^yahoo.co.in')
insert into mail3 values('mansi.sharma*yahoo.co.in')
insert into mail3 values('mansi.sharma&yahoo.co.in')
insert into mail3 values('mansi.sharma!yahoo.co.in')
insert into mail3 values('mansi&sharma!yahoo.co.in')
select * from mail3

select * from mail3 where email like '%+%' or '%*%' I have tried the above query but error is coming. Reply .thx in advance.

The correct code is: select * from mail3 where email like '%+%' or email like '%*%'

Thx,It worked.
Plz see the following query-

SELECT * FROM mail3 
WHERE email NOT LIKE '%@%' 
or email not like '%&%'

Instead of showing the particular records ,the above query is displaying all the records.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.