Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sequelize upsert when using sql server

Tags:

sequelize.js

can somebody tell me if a sequelize upsert works in sql server? I'm using, specifically, sql server version 2012.

I'm confused because, in the sequelize docs, they state implementation details for:

MySQL, PostgresSQL and SQLite, but not include sql server in the list.

So, I'm curious if it is posible to do an upsert when using sql server (2012).

like image 201
Manuel Rivera Avatar asked Dec 06 '25 07:12

Manuel Rivera


2 Answers

UPSERT is now supported on MSSQL using MERGE statement

http://docs.sequelizejs.com/manual/tutorial/upgrade-to-v4.html

like image 142
malix Avatar answered Dec 10 '25 08:12

malix


It's work on MSSQL, I've used upsert on my expressJs that using MSSQL as database. You can see that here

like image 30
Blackjack Avatar answered Dec 10 '25 09:12

Blackjack



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!