Announcement

Collapse
No announcement yet.

Error bei der Benutzung einer sequence als primary key

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error bei der Benutzung einer sequence als primary key

    Hi,

    Ich möche für eine primary key eine sequence als default wert zu setzen und ich bekomme folgende Fehlermeldung:

    Failed to commit: ORA-00984: column not allowed here


    Hat jemad eine Idee?

    Tausend Dank, ich bin am Verzweifeln!!

  • #2
    Hi,

    Du kannst keine Sequenze als Defaultwert einer Spalte setzen.
    Um eine Spalte so zu befüllen, verwendet man in Oracle einen Trigger:
    http://sql-tips.de/index.php/Oracle_..._einer_Auto_ID

    Dim
    Zitat Tom Kyte:
    I have a simple philosophy when it comes to the Oracle Database: you can treat it as a black box and just stick data into it, or you can understand how it works and exploit it as a powerful computing environment.

    Comment


    • #3
      Ein Code-Ausschnitt deines Triggers wäre ansonsten hilfreich, falls überhaupt einer bis jetzt existiert.

      Comment

      Working...
      X