some questions

From: ZioBudda <michel(at)michel(dot)enter(dot)it>
To: pgsql-general(at)postgreSQL(dot)org
Subject: some questions
Date: 1998-10-13 12:33:46
Message-ID: Pine.LNX.4.03.9810131433020.3346-100000@michel.enter.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)enter(dot)it - http://ziobudda.enter.it/
Linux Problem? Ask to linux(at)media(dot)dsi(dot)unimi(dot)it
"/dev/ziobudda: access to /var/tmp/beer denied, use /var/adm/pineapple"

Browse pgsql-general by date

  From Date Subject
Next Message Henning Brunzel 1998-10-13 12:42:40 subscribe
Previous Message AGRE Enterprises 1998-10-13 01:02:38 Need help with db procedure