Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL-Select command question
This is probably a pretty simple question, but I can't figure out a way to do this with one select statement. I want to query a table that contains information on 32 companies. I need to query infomation on 30 of those companies. I've tried all of the commands below with no avail.
Select from where field1 <> 'A' or field1 <> 'B'
Select from where field1 <> 'A' and field1 <> 'B'
Select from where (field1 <> 'A' or field1 <> 'B')
Select from where (field1 <> 'A' and field1 <> 'B')
All of these picked up the info on all of the companies. I've run into this problem before and have just done the following (which I can do again).
Select from
delete all for field1 = 'A' or field1 = 'B'
I was just wondering if there was a way to get the results I want without doing the delete command.
Thanks.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement