Mandatory one to mandatory many relationship

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • catherineadams
    New Member
    • Dec 2014
    • 4

    #1

    Mandatory one to mandatory many relationship

    Hello! I have Contract and Rent_Payment. I want to make it mandatory one to mandatory many so that a Contract must have one or more Rent_Payments.
    I understand that after I create both tables, I then use

    How do I deal with this?

    I figured it out! Cant figure out how to delete though...
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    We would need the commands you are running that produce the error, the full error message, and the full data definition language for the tables involved.

    Comment

    • catherineadams
      New Member
      • Dec 2014
      • 4

      #3
      This is the error:
      Error report -
      SQL Error: ORA-01758: table must be empty to add mandatory (NOT NULL) column
      01758. 00000 - "table must be empty to add mandatory (NOT NULL) column"
      *Cause:
      *Action:

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        And the rest of the information I asked for?

        But the error message itself is helpful. It's pretty self explanatory. It says the table can't have any data if you want to add a not null field.

        Comment

        Working...