0

I have created an index on Global Temporary Table(ON COMMIT DELETE ROWS). It has composite index with unique constraint. When I am trying to insert a row in this table, it is giving me unique index key constraint violated error.

I am trying to insert this data throught sql file and there is only one row of data to be inserted.

How can it give unique key index violation.

Kindly let me know what am I missing?

Any help is much appreciated.Thanks in advance

sqlpractice
  • 141
  • 1
  • 3
  • 11
  • 1
    Post an reproducible example. What you are describing doesn't make sense so I would strongly suspect that there is something that you are inadvertently leaving out. Perhaps there are already rows in the table when you run the load, perhaps the load is trying to insert more than one row. – Justin Cave Mar 07 '16 at 18:37
  • 1
    Please show the query from the file, in context. I'm going to guess you have an insert that you're terminating with a semicolon, and have a / on the next line, causing the insert to be executed a second time. Similar to [this](http://stackoverflow.com/a/28210080/266304). – Alex Poole Mar 07 '16 at 18:39
  • Thank you for the replies.@Alex u are right.The problem was because of semicolon and slash. Removing the slash worked .Thanks a lot for the solution – sqlpractice Mar 08 '16 at 03:11
  • Possible duplicate of [SQLPlus is trying to drop package twice](http://stackoverflow.com/questions/28209880/sqlplus-is-trying-to-drop-package-twice) – Alex Poole Mar 08 '16 at 08:38

0 Answers0