SQL Where Statment with Multiple Values

Posted on 2009-12-31
Last Modified: 2013-12-07
I need to do a select statement for mutliple values within the same column.

select * from car
where car_name= 'value'

I need several data values for value.  That is value is  pontiac, acura, and volvo.

How do you do that in SQL?  Hope I was able to explain this okay -- it's hard to explain.
Question by:lcor
    LVL 75

    Accepted Solution

    select * from car
    where car_name  in (  'pontiac', 'acura', 'volvo' )

    Expert Comment

    you can also use AND

    Where Car_Name is 'Pontiac' and 'Acura' And 'Volvo' if you want to select all the car's

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that useā€¦
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
    This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now