[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Postgresql-it] Nuova struttura tabella e vecchi record
- From: "Matteo Beccati" <php@xxxxxxxxxxx>
- Subject: Re: [Postgresql-it] Nuova struttura tabella e vecchi record
- Date: Fri, 4 Jul 2003 16:30:15 +0200
Ciao,
ALTER TABLE tabella RENAME TO tmp_tabella;
CREATE TABLE tabella (
nome_cognome varchar(255) NOT NULL...,
telefono varchar(64),
PRIMARY KEY (nome_cognome)
-- poi vedi tu la struttura...
);
INSERT INTO tabella (nome_cognome, telefono) SELECT nome || ' ' || cognome,
telefono FROM tabella_tmp;
Ciao ciao
--
Matteo Beccati
http://www.phpadsnew.com/
http://www.phppgads.com/