JPA SET IDENTITY_INSERT not working

前端 未结 2 2020
臣服心动
臣服心动 2021-01-19 16:50

I want to run this query from JPA from my code. But its not working.

Please help.

SET IDENTITY_INSERT \"+tableName+\" ON

UP

2条回答
  •  执笔经年
    2021-01-19 17:14

    You don't want quotes around the table name.

    ="SET IDENTITY_INSERT "+tableName+" ON"

提交回复
热议问题