# insert oddity

**URL:** <https://forum.kx.com/t/insert-oddity/6169>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [August 6, 2009, 1:35pm UTC](https://forum.kx.com/t/insert-oddity/6169 "2009-08-06T13:35:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![annakh71](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@annakh71](https://forum.kx.com/u/annakh71)\
**Post date:** [August 6, 2009, 1:35pm UTC](https://forum.kx.com/t/insert-oddity/6169/1 "2009-08-06T13:35:00Z")

</div>

Consider any empty keyed table t; insert of another empty tablewith the appropriate structure (e.g., t itself) will fail with a typeerrorbut upsert will succeed. I am a bit nonplussed by this behaviour;what is the rationale?q)t:([a:0#0n];b:0#`)q)upsert[t;t];q)insert[t;t];'type
