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
  1. Home
  2. Database & SysAdmin
  3. Database
  4. MySQL Database Tables

MySQL Database Tables

Scheduled Pinned Locked Moved Database
databasemysqlhelptutorialquestion
3 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.
  • S Offline
    S Offline
    sudevsu
    wrote on last edited by
    #1

    Can anyone here help in creating a Tables with Primary Key and Foreign Key? I have created tables but failed in Primary Key and Foreign Key. I am very new to Database.

    CustInfo DealerInfo AssDealerInfo VehicleInfo LineItem
    CustID(PK) DealerID(PK) AsDealerID(PK) VID(PK) LineItemID (PK)

    Now I want a Foreign Key dependency on AssDealerInfo that should have access to all the other tables. How to achieve this?

    Your help is much appreciated. Thanks Happy Coding!

    R 1 Reply Last reply
    0
    • S sudevsu

      Can anyone here help in creating a Tables with Primary Key and Foreign Key? I have created tables but failed in Primary Key and Foreign Key. I am very new to Database.

      CustInfo DealerInfo AssDealerInfo VehicleInfo LineItem
      CustID(PK) DealerID(PK) AsDealerID(PK) VID(PK) LineItemID (PK)

      Now I want a Foreign Key dependency on AssDealerInfo that should have access to all the other tables. How to achieve this?

      Your help is much appreciated. Thanks Happy Coding!

      R Offline
      R Offline
      RUs123
      wrote on last edited by
      #2

      Can you please provide more information about attributes you have in your tables and which ones you would like to have Foreign Key constraints on ? And please explain what have you tried so far. What sort of errors did you get? If you haven't tried anything yet I would point you to these links: [General Create table and Primary Keys] [Foreign Keys]

      S 1 Reply Last reply
      0
      • R RUs123

        Can you please provide more information about attributes you have in your tables and which ones you would like to have Foreign Key constraints on ? And please explain what have you tried so far. What sort of errors did you get? If you haven't tried anything yet I would point you to these links: [General Create table and Primary Keys] [Foreign Keys]

        S Offline
        S Offline
        sudevsu
        wrote on last edited by
        #3

        Thank you for the article. I have gone through it earlier but this time it is nice to read again. And I am using System i Navigator. Now in general DB2 or AS400 how can I create a Stored Procedure with parameters for Insert Statement? I totally agree that when everyone in the world is moving with new technologies and migrating data from AS400 to Oracle/SAP or some other things. I am still using this because my boss just loves AS400 like crazy.

        Your help is much appreciated. Thanks Happy Coding!

        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