Is not equal to query...

Поиск
Список
Период
Сортировка
От James David Smith
Тема Is not equal to query...
Дата
Msg-id BANLkTikpqm1S7O+YQDuHD4P-o-FoTBr6JQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Is not equal to query...  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-novice
Hi everyone,

A bit of help please. This query works for me, and gives me 332,000
rows of records out of my table of 400,000 rows. It takes about a
minute to run.

SELECT vehicle.*
FROM vehicle, incidents
WHERE incidents.key = vehicle.incident_link;

Would I would like to do however, is remove the data from this table
that does not match the above query. So to start with, I thought that
I'd better try and identify this data using the query below. You'll
note I have simply changed the '=' for '!=' instead.

SELECT vehicle.*
FROM vehicle, incidents
WHERE incidents.key != vehicle.incident_link;

However when I run this query, after about 10-15 minutes, I still
don't have a result. I don't really understand why not.

Cheers as always.

James

В списке pgsql-novice по дате отправления:

Предыдущее
От: Erasmo Zottola - Elman
Дата:
Сообщение: PL/pgSQL editor/debugger
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Is not equal to query...