some questions - Mailing list pgsql-general

From ZioBudda
Subject some questions
Date
Msg-id Pine.LNX.4.03.9810131433020.3346-100000@michel.enter.it
Whole thread Raw
List pgsql-general
Hi, i have some questions.

1)i have this table:

esame=> select * from libro_autore\g
id_libro|id_autore
--------+---------
s5      |        1
s5      |        1
s7      |        1
s7      |        2
s8      |        1
s8      |        2
s9      |        1
s9      |        2
s9    |     3
(9 rows)

where id_libro is the ID about a book, and id_autore is the ID of an
author that he has write the book. Note that I can have more id_autore
for 1 book (n:1). I want to know a select that return me the book that is
write for "n" authors.
I have found only the select that return me a book writes from 2 authors.

2)How can I get the last id insert from ....

3) I have this table :

Table    = utente
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                | Length|
+----------------------------------+----------------------------------+-------+
| cognome                          | varchar() not null               |    20 |
| nome                             | varchar()                        |    20 |
| id_utente                        | int4 not null                    |     4 |
| indirizzo                        | varchar()                        |    80 |
| telefono                         | varchar() not null               |    14 |
| tipo_utente                      | int4                             |     4 |
| info_utente                      | varchar() not null               |    40 |
| notifica1                        | date                             |     4 |
| notifica2                        | date                             |     4 |
| notifica3                        | date                             |     4 |
+----------------------------------+----------------------------------+-------+

I want to insert (in the primary "INSERT INTO") a NULL date. only in a
second time I want to insert a value in notifica1 or in notifica2 or in
notifica3.

tnx in advance.


A SI BIRI
--
Italian Linux Meeting - http://www.pluto.linux.it/meeting/
--
Morelli 'ZioBudda' Davide Michel - Member of Pluto Linux User Group
michel@enter.it - http://ziobudda.enter.it/
Linux Problem? Ask to linux@media.dsi.unimi.it
"/dev/ziobudda: access to /var/tmp/beer denied, use /var/adm/pineapple"


pgsql-general by date:

Previous
From: AGRE Enterprises
Date:
Subject: Need help with db procedure
Next
From: Henning Brunzel
Date:
Subject: subscribe