...

Поиск
Список
Период
Сортировка
От Àíäðåé Íîâèêîâ
Тема ...
Дата
Msg-id 4578.990127@webclub.ru
обсуждение исходный текст
Ответы Re:  (Herouth Maoz <herouth@oumail.openu.ac.il>)
Re: your mail  (Brian Baquiran <brianb@evoserve.com>)
Список pgsql-sql
Hello.

Before  SERIAL  type appeared I used INTEGER, so it was easy
to add instance which is stored not in one table. Now when I
have  a  primary key of SERIAL type I do not know how to add
data to multiple tables (and even to one table too :)

For instance I have:
create table companies(
 id serial primary key,
 ...
);
create table ccats(
 cid integer not null references companies(id),
 catid integer not null references categories(id)
);

What do I have to put instead of ??:
insert into companies values (??, ...);
insert into ccats (??, 5);
...
insert into ccats (??, 7);

Andrey.



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

Предыдущее
От: "±èÇö"
Дата:
Сообщение: subscribe pgsql-admin
Следующее
От: Herouth Maoz
Дата:
Сообщение: Re: