user2990430
user2990430

Reputation: 23

How can I listing only certain emails in SQL?

So I have at table in SQL and I want to list only people who have an email at yahoo.com

for example:

EMAIL
------------
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

how can i do that?

Upvotes: 0

Views: 56

Answers (2)

Dgan
Dgan

Reputation: 10295

select * from table where email like '%@yahoo.com'

Upvotes: 0

elixenide
elixenide

Reputation: 44851

It depends on what database you're using, but something like this:

SELECT * FROM people WHERE email LIKE "%@yahoo.com"

Where people is your table name and email the column with the addresses.

Upvotes: 5

Related Questions