# ERROR: INSERT has more target columns than expressions

**URL:** <https://forum.inductiveautomation.com/t/error-insert-has-more-target-columns-than-expressions/49357>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [July 29, 2021, 3:59pm UTC](https://forum.inductiveautomation.com/t/error-insert-has-more-target-columns-than-expressions/49357 "2021-07-29T15:59:24Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [July 29, 2021, 7:05pm UTC](https://forum.inductiveautomation.com/t/error-insert-has-more-target-columns-than-expressions/49357/10 "2021-07-29T19:05:40Z")

</div>

This post might be of help

> [@Insert into database only if the entry doesn't exist](https://forum.inductiveautomation.com/t/insert-into-database-only-if-the-entry-doesnt-exist/35122/2):
>
> There are two ways to do this - check for a duplicate manually with python before inserting, and if there’s a problem show the screen Make UNIQUE INDEX definitions on your table in the database, and then just try/except inserting into it. Personally I like to leave data integrity to the database where appropriate, and ensuring UNIQUE-ness is one of those times in my opinion. I use this method for a MySQL DB and it looks like this in practice. My personal solution would be to make your n…

---

_[View the full topic](https://forum.inductiveautomation.com/t/error-insert-has-more-target-columns-than-expressions/49357)._
