Which command would replace IDENTITY INSERT ON/OFF from SQLServer in Oracle?

Posted by rodrigoq on Stack Overflow See other posts from Stack Overflow or by rodrigoq
Published on 2010-05-03T15:04:12Z Indexed on 2010/05/03 15:08 UTC
Read the original article Hit count: 158

Hello, I have to migrate this query (simplified here) from T-SQL to ORACLE

SET IDENTITY_INSERT table ON

INSERT INTO table (id, value) VALUES (1, 2)

SET IDENTITY_INSERT table OFF

id being an Identity field in SQLServer.

I have the same table with a sequence in ORACLE, I couldn't find a snippet that shows how to disable the sequence and set it to start again with the MAX(id) + 1.

Any ORACLE expert can help me with this?

Thanks, Rodrigo.

© Stack Overflow or respective owner

Related posts about migration

Related posts about tsql