goodgirlatx347
goodgirlatx347

Reputation: 31

Oracle - Need Help w/finding Specific City in Tables

I'm new to Oracle and having trouble finding how to search the tables by specific city. I've looked around and a few examples come up but I don't know if I'm on the right track or not. See my examples below.

Can someone please help?

SELECT company, city
FROM customer
WHERE city = 'Sunnyvale', 'Redwood City';

Upvotes: 0

Views: 288

Answers (2)

Segun Adeniji
Segun Adeniji

Reputation: 390

try this:

SELECT Distinct company, city 
FROM customer 
WHERE city = 'Sunnyvale' or  city ='Redwood City';

if this is not working, you need to use this statement to show your table structure, if you are sure of creating the table structure

DESCRIBE customer;

it suppose to bring the table info

Upvotes: 0

Segun Adeniji
Segun Adeniji

Reputation: 390

SELECT company, city 
FROM customer 
WHERE city in ( 'Sunnyvale', 'Redwood City');

Upvotes: 3

Related Questions