0

--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.

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by mansi sharma
0

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

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.