Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

SQL columns

  1. Jan 6, 2005 #1
    Isn't possible to delete and remove columns after a table has been created?
    Rows works just fine but columns don't...
     
  2. jcsd
  3. Jan 6, 2005 #2
  4. Jan 6, 2005 #3
    Note that columns and rows in a database are very different things, so the fact that you can do something to a row doesn't automatically mean you should be able to do the same thing to a column.


    Still, any good database should allow you to delete a column unless you've deliberately added constraints that would prevent it. But you have to modify the table to do that, usually with an ALTER TABLE statement.
     
  5. Jan 6, 2005 #4
    You can, but its not considered a good thing to do, except possibly when prototyping. This is because you are altering your schema, which shouldn't happen. Would you want to alter the form of a data structure at runtime?
     
  6. Jan 7, 2005 #5
    If your schema is wrong, why wouldn't you change it?
     
  7. Jan 7, 2005 #6
    It is a DDL command and is language specific.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: SQL columns
  1. SQL Help? (Replies: 8)

Loading...