Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. SQL: How to create a 1:1 relation?

SQL: How to create a 1:1 relation?

Scheduled Pinned Locked Moved Database
databasehelptutorialquestionannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    King_of_Queens
    wrote on last edited by
    #1

    Hello i serach for an sql command which creates a 1:1 relation in an access database. I think i can do this wiht CONSTRAINT but how? In the access help i found this: CREATE TABLE Bestell (BestellId INTEGER PRIMARY KEY, KundId INTEGER, BestellNotiz NCHAR VARYING (255), CONSTRAINT FKBestellKundId FOREIGN KEY (KundId) REFERENCES Kunden ON UPDATE CASCADE ON DELETE CASCADE but this creates only 1:N relation!

    M 1 Reply Last reply
    0
    • K King_of_Queens

      Hello i serach for an sql command which creates a 1:1 relation in an access database. I think i can do this wiht CONSTRAINT but how? In the access help i found this: CREATE TABLE Bestell (BestellId INTEGER PRIMARY KEY, KundId INTEGER, BestellNotiz NCHAR VARYING (255), CONSTRAINT FKBestellKundId FOREIGN KEY (KundId) REFERENCES Kunden ON UPDATE CASCADE ON DELETE CASCADE but this creates only 1:N relation!

      M Offline
      M Offline
      Mike Dimmick
      wrote on last edited by
      #2

      Add a UNIQUE constraint to KundId?

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups