Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2010
    Posts
    153
    Thanks
    53
    Thanked 0 Times in 0 Posts

    Adding a column to multiple tables at once

    Hi, how do you add a column to multiple tables at once? Is it possible?

    Thanks
    Last edited by wincode; 12-31-2011 at 08:19 PM.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,688
    Thanks
    80
    Thanked 4,655 Times in 4,617 Posts
    If you mean with one SQL statement, no, it's not possible.

    If you mean with one Stored Procdefure, yes, it is.

    If you mean with a handful of PHP/JSP/ASP statements, yes, it is.

    But the very fact you are asking this question makes me thing you may have a bad database design. For example, if you have one table for each user or something like that, you have a bad design. You might want to show us at least an outline of your DB schema.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

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