How to have several values in a sql query [closed]

-1

I have a database and I make a query that only shows several data and others do not.

Example. That from a table to take the models of the cars, but that they are not certain marks, How would the query be?

    
asked by Francisco Cardenas 16.08.2017 в 04:27
source

1 answer

0

Although without further information it is difficult to give a specific answer, as an example, in a table called cars, which has, among other possibles, the fields model, brand and price, a query could be:

SELECT modelo, precio FROM coches
WHERE marca NOT IN ('Opel', 'Seat', 'Mercedes')

This query selects the model and price of all the records in the table that your brand is neither Opel nor Seat or Mercedes.

    
answered by 16.08.2017 / 10:06
source