hi all,
Question:
i have a table in a database of 6 columns and 630 rows.i want to add one new column to this table and also update this column starting from row 1 to row 630.
System information:
1.Linux ac8d7f39.ipt.ao l.com 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux
2. PostgreSQL 7.4.6
My trial:
1. i added one column with ALTER TABLE command
it worked well .i checked by select command.
2. then i copied data into that column by COPY FROM command
the data is copied from file BUT the problem is that it didnt add the data from very 1st row, rather it added data into that column after row 630.
finally row must be 630, BUT it came to be 1260.
please solve or suggest suitable command .
i hope i put my problem explicitly.
with regard
mamoon
Question:
i have a table in a database of 6 columns and 630 rows.i want to add one new column to this table and also update this column starting from row 1 to row 630.
System information:
1.Linux ac8d7f39.ipt.ao l.com 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux
2. PostgreSQL 7.4.6
My trial:
1. i added one column with ALTER TABLE command
Code:
ALTER TABLE only maintable add column id_local text;
2. then i copied data into that column by COPY FROM command
Code:
COPY maintable (id_local) from 'unix path name of source file' with delimiter as '\n';
finally row must be 630, BUT it came to be 1260.
please solve or suggest suitable command .
i hope i put my problem explicitly.
with regard
mamoon
Comment