# Mysql insert for column with enumerated values?

**URL:** <https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620>\
**Category:** Questions\
**Tags:** mysql\
**Created:** [June 17, 2024, 2:51pm UTC](https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620 "2024-06-17T14:51:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkintenn](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@tkintenn](https://community.n8n.io/u/tkintenn)\
**Post date:** [June 17, 2024, 2:51pm UTC](https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620/1 "2024-06-17T14:51:39Z")

</div>

I have an insert that works, until i try to send a field that is type enum. The value that’s being sent is in the enumerated fields in the database. It’s for states, so TN is in the value set and that’s also a value in the ENUM list. However I get this error with n8n when trying to insert:

```auto

NodeOperationError: Data truncated for column 'clState' at row 2 at Object.parseMySqlError (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/MySql/v2/helpers/utils.js:74:12) at /usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/MySql/v2/helpers/utils.js:171:47 at processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/MySql/v2/actions/database/insert.operation.js:171:18) at Object.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/MySql/v2/actions/router.js:53:30) at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/MySql/v2/MySqlV2.node.js:16:16) at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:728:19) at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:660:53 at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1062:20

```

n8n 1.38.2  
self hosted mysql database (n8n is using it’s default)  
Docker  
Ubuntu 22.04lts

---

<div class="post-metadata">

**Author:** ![n8n](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/n8n/32/196425_2.png) [@n8n](https://community.n8n.io/u/n8n)\
**Post date:** [June 17, 2024, 2:51pm UTC](https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620/2 "2024-06-17T14:51:40Z")

</div>

It looks like your topic is missing some important information. Could you provide the following if applicable.

- **n8n version:**
- **Database (default: SQLite):**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):**
- **Operating system:**

---

<div class="post-metadata">

**Author:** ![aya](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aya/32/194036_2.png) [@aya](https://community.n8n.io/u/aya)\
**Post date:** [June 19, 2024, 8:42am UTC](https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620/3 "2024-06-19T08:42:36Z")

</div>

Hi @tkintenn, could you share the exported JSON for the MySQL node you’re doing this with? You can do so by [copy & pasting the workflow JSON content](https://docs.n8n.io/workflows/export-import/) in between two block quotes (```)

---

<div class="post-metadata">

**Author:** ![aya](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/aya/32/194036_2.png) [@aya](https://community.n8n.io/u/aya)\
**Post date:** [June 19, 2024, 8:58am UTC](https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620/4 "2024-06-19T08:58:25Z")

</div>

Also, it might be helpful if you could share additional info like the following,

1. The full schema of the table. You can get this by running the following SQL command:

```auto
SHOW CREATE TABLE name_of_table;

```

2. The exact ENUM definition for the `clState` column:

```auto
SHOW COLUMNS FROM name_of_table LIKE 'clState';

```

---

<div class="post-metadata">

**Author:** ![tkintenn](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@tkintenn](https://community.n8n.io/u/tkintenn)\
**Post date:** [June 20, 2024, 11:48am UTC](https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620/5 "2024-06-20T11:48:07Z")

</div>



---

<div class="post-metadata">

**Author:** ![tkintenn](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@tkintenn](https://community.n8n.io/u/tkintenn)\
**Post date:** [June 20, 2024, 12:25pm UTC](https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620/6 "2024-06-20T12:25:20Z")

</div>

I’m trying to paste the output from mysql and keep getting a 403 error.

---

<div class="post-metadata">

**Author:** ![tkintenn](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@tkintenn](https://community.n8n.io/u/tkintenn)\
**Post date:** [June 20, 2024, 12:26pm UTC](https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620/7 "2024-06-20T12:26:28Z")

</div>

clState | enum(‘AL’,‘AK’,‘AZ’,‘AR’,‘CA’,‘CO’,‘CT’,‘DE’,‘DC’,‘FL’,‘GA’,‘HI’,‘ID’,‘IL’,‘IN’,‘IA’,‘KA’,‘KY’,‘LA’,‘ME’,‘MD’,‘MA’,‘MI’,‘MN’,‘MS’,‘MO’,‘MT’,‘NE’,‘NV’,‘NH’,‘NJ’,‘NM’,‘NY’,‘NC’,‘ND’,‘OH’,‘OK’,‘OR’,‘PA’,‘RI’,‘SC’,‘SD’,‘TN’,‘TX’,‘UT’,‘VT’,‘VA’,‘WA’,‘WV’,‘WI’,‘WY’) | YES | | NULL | |

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [September 18, 2024, 12:26pm UTC](https://community.n8n.io/t/mysql-insert-for-column-with-enumerated-values/48620/8 "2024-09-18T12:26:49Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
