How to include column headers also with the export result in IBM DB2
问题 I was trying to export data from table in DB2 using command..I m abo to export into csv file..But column headers are not there..Need to have column headers as well.So what I can add in the sql query to get column headers as well 回答1: This is possible in the latest (2019) Db2 11.5 release and Db2 Warehouse (local and on Cloud) with EXTERNAL TABLE feature via INCLUDEHEADER / COLUMN_NAMES switch, see an example $ db2 "create external table '/home/db2v115/staff.csv' using (delimiter ','