Wednesday, September 11, 2013

Sample DB2 commands.

A sample statement to dump all the data from a particular table to an external file

export to outfile.txt    of del select * from  itmuser."Linux_CPU_Averages_H"

--
Likewise one can import it back into the tables

import from outfile.txt   of del insert into itmuser."Linux_CPU_Averages_H"

--
Getting a count of records in a table.
select count(*) from itmuser."Linux_CPU_Averages_H"

No comments:

Post a Comment