Arjen van der Meijden wrote:
There are two solutions:
You can insert all data from tableB in tableA using a simple insert
select-statement like so:
INSERT INTO tabelA SELECT EmpId, EmpName FROM tabelB;
Or you can visually combine them without actually putting the records
in a single table.
Any luck on appending two table in PostgreSQL.
Below are two table with same schema that have different values. In this
case EmpID is unique value.
tabelA
EmpId (Int) EmpName (String)
1 Hanu
2 Alvaro
tabelB
EmpId (Int) EmpName (String)
3
There are two solutions:
You can insert all data from tableB in tableA using a simple insert
select-statement like so:
INSERT INTO tabelA SELECT EmpId, EmpName FROM tabelB;
Or you can visually combine them without actually putting the records in
a single table. That can be with a normal
Arjen van der Meijden [EMAIL PROTECTED] writes:
There are two solutions:
...
Or you can visually combine them without actually putting the records in a
single table. That can be with a normal select-union statement or with a view,
something like this:
SELECT EmpId, EmpName FROM tabelA UNION
Thanks for quick answer.
Previsoly I have exported table records into employee.csv file using COPY
command which has 36,00, records.
After that I have added few more entries in database and EmpId is
incremented.
I want put the exported data back into database with re-generating new
EmpId.
Can you help me appending two table values into single table without
performing INSERT?
Note that these tables are of same schema.
Is there any sql command is supported?
Thanks,
Hanu
On 5/29/07, Alvaro Herrera [EMAIL PROTECTED] wrote:
Michal Szymanski wrote:
There is another strange thing.