Re: Inserting data of two other tables [Now deleting ...]
| От | papapep |
|---|---|
| Тема | Re: Inserting data of two other tables [Now deleting ...] |
| Дата | |
| Msg-id | 3ED342E2.1020902@gmx.net обсуждение исходный текст |
| Ответ на | Re: Inserting data of two other tables [Now deleting ...] (Nabil Sayegh <postgresql@e-trolley.de>) |
| Ответы |
Re: Inserting data of two other tables [Now deleting ...]
|
| Список | pgsql-novice |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Nabil Sayegh wrote:
| DELETE FROM a WHERE datum='17.07.1999'::date
~ ^^^^^^^^^^^^
This data is not in the "a" table, is in the b one. And the records I
need to remove are the ones from the b table. Will it work this way?
| AND NOT EXISTS (SELECT NULL FROM b WHERE b.field=a.field);
What does this part do? It selects rows where b.field and a.field are
not the same? And the "AND NOT EXISTS"? It inverts the query? I mean, if
the intraparenthesys part selects the rows where b.field <> a.field,
after you change the "sign", selecting the rows that DO have the
b.field=a.field?
I'm a bit confused...
Josep Sànchez
~ [papapep]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE+00Lh2vx52x0kyz4RArDQAKDODxurcQ8vAcm2Yqpwy++JoAKkfQCgrlH8
ffb9xgmRvQd2HH/0ycT9u8M=
=D900
-----END PGP SIGNATURE-----
В списке pgsql-novice по дате отправления: