kumnr NOT IN (SELECT dokumnr FROM dok);
and DELETE statement
DELETE FROM rid WHERE dokumnr NOT IN (SELECT dokumnr FROM dok);
Andrus
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
by comparing bitmaps.
Is it possible to speed up this query is Postgres ? How to force Postgres to
use indexes for this query ?
Andrus
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(s
> Andrus Moor wrote:
>> I have item table and a lot of child tables where the items are used.
>> I want to merge two item codes into single item in all tables.
>> It is not nice to write a lot of separate UPDATE statements for each
>> table.
>> So I want to util
rders VALUES ('2');
INSERT INTO invoices VALUES ('2');
BEGIN;
-- Direct Postgres to update all child tables. This causes error.
UPDATE parent SET code='1' WHERE code='2';
-- Remove duplicate row
CREATE TABLE parent AS
SELECT * FROM parent
GRO
I want to nullify fields which does not exist in reference table.
I tried
UPDATE demo.toode
SET "liik"=NULL,"grupp"=NULL
WHERE ("grupp","liik") NOT IN
(SELECT ("grupp", "liik") FROM "artliik")
but this causes error:
ERROR: operator d
I want to implement a multi-company database where each schema represents
different company.
I created a number of schemas in a database.
How to select a list of schema names which current user is authorized to
access ?
I want to get the list of companies to allow user pick the one.
---