1

For eg: Table has the 3 columns:

Name varchar(10),        
ID   int,    
Place Varchar(10)

File has ID,name and place in a different order that as the table above:

1|Ram  |Ayodhya              
2|Rahul|Srilanka
data_henrik
  • 16,724
  • 2
  • 28
  • 49

1 Answers1

1

You can specify the column list in the Db2 IMPORT command as part of the INSERT clause.

IMPORT .... INSERT INTO yourTable(ID, NAME, PLACE)

The same reordering of columns can be performed for the LOAD command, too.

data_henrik
  • 16,724
  • 2
  • 28
  • 49
  • 1
    Yes, sure. You asked for IMPORT. Both LOAD, IMPORT and INGEST share a common syntax. If that addresses your question, please mark answered and upvote (up arrow) – data_henrik Sep 24 '20 at 08:30
  • how can i do this if i have to use replace command instead of insert – sravanthi leela Oct 08 '20 at 09:13
  • If you followed the link to the syntax, you should have seen that both INSERT and REPLACE have the same "column list" clause. Have you tried it? – data_henrik Oct 08 '20 at 09:17