Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    3

    Angry Unanswered: Adding columns not present

    I have created my database and Tables, but need to plan for the future before starting my programming.
    Now I need to plan for Future updates, which also goes for updates on my tables. I need to add fields to CURRENT tables if they do not exist in that Table. This will all be done through code also using queries.
    I have looked at the Alter table but it gives an error when a duplicate field is added.(<- This is understandable.) But I need the program to ignore fields already added. Any help or suggestions PLEEAASSSEE.
    Thanks
    Billy

  2. #2
    Join Date
    Mar 2004
    Location
    Venice,Italy
    Posts
    20
    two solution:
    1) issue one alter table at time for column, and ignore errors
    2) compare the structure on the db with the one you want to use, and then alter the ones that don't match...

  3. #3
    Join Date
    Feb 2004
    Posts
    3

    thanks

    Just a stupid question?

    How do I compare the Tables?

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54

    Re: thanks

    Originally posted by randdata
    Just a stupid question?

    How do I compare the Tables?
    Have your program do a SHOW TABLE, and inspect the results?

    -PatP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •