0

I created external table with following command

db2 "

CREATE EXTERNAL TABLE TEST(a int) using
  (dataobject '/home/db2inst2/test.tbl' )
  )
"
db2 "insert into TEST values(1)"
db2 "insert into TEST values(2)"

But looks like it is replacing value. Is there any option to append files & do basic DML operation on external table. Please let me know if any other option available in db2 V11.5

Vishnu
  • 97
  • 1
  • 13

1 Answers1

0

It's not possible.

CREATE EXTERNAL TABLE statement

Restrictions

  • External tables cannot be used by a Db2 instance running on a Windows system.
  • Data being loaded must be properly formatted.
  • You cannot delete, truncate, or update an external table.
  • For remote external tables (that is, for external tables are not located in a Swift or S3 object store and for which the REMOTESOURCE option is set to a value other than LOCAL):
    • A single query or subquery cannot select from more than one external table at a time, and cannot reference the same external table more than once. If necessary, combine data from several external tables into a single table and use that table in the query.
    • A union operation cannot involve more than one external table.

In addition:

For an unload operation, the following conditions apply:

  • If the file exists, it is overwritten.
Mark Barinstein
  • 11,456
  • 2
  • 8
  • 16
  • Thanks for reply..... Basically I need to avoid reorg as table size is very huge , Do we have any new option in latest versio – Vishnu Nov 18 '19 at 15:50
  • 1
    There is a feature called "reduced redo logging", which should be available by default in warehouse installations. It reduces logging automatically, when your table changes become "large enough". May be helpful for large "insert select" / CTAS statements. – Mark Barinstein Nov 18 '19 at 16:57