Re: Restructuring a table

From: Silvio Bierman (sbierman_at_idfix.nl)
Date: 12/20/03

  • Next message: NicK: "Re: Sample Java code requested"
    Date: Sat, 20 Dec 2003 01:23:21 +0100
    
    

    "Ike" <rxv@hotmail.com> wrote in message
    news:nEHEb.5086$wL6.1820@newsread1.news.atl.earthlink.net...
    > Suppose I have a table, and it is populated with many rows already.
    However,
    > I realise I structured something wrong in my table. I dont want to have to
    > go back and repopulate the entire table.
    >
    > For example, suppose I have a field:
    >
    > "inoutstatus INTEGER(3),"
    >
    > Which I now realize should be :
    >
    > "inoutstatus CHAR(1),"
    >
    > Is there a way I can change the entire table without losing the other
    > records in each row? I can go back in and repopulate the inoutstatus
    fields,
    > but I really would like to know if there is merely some type of SQL
    command
    > I can issue to restructure the table this way.
    >
    > Thanks, Ike
    >
    >

    Look into ALTER TABLE statements. Beware of conversion issues when changing
    the type of a column.

    Silvio Bierman


  • Next message: NicK: "Re: Sample Java code requested"

    Relevant Pages

    • Re: Large dataset displayed but kills application
      ... DONT use a dataset, if you dont need all the feautures. ... >> I have a page where I input two dates, click a button that runs a query ... >> and binds it to a datagrid. ... >> is OK and I can click my button again and again and it will repopulate ...
      (microsoft.public.dotnet.framework.aspnet.datagridcontrol)
    • Restructuring a table
      ... I dont want to have to ... I can go back in and repopulate the inoutstatus fields, ... Thanks, Ike ...
      (comp.lang.java.databases)
    • materialized view vs. denormalized table
      ... Whats the difference between these two? ... Dont you need to update/ repopulate them both if data in ... TIA, ChrisR ...
      (microsoft.public.sqlserver.server)
    • Re: materialized view vs. denormalized table
      ... no you would not have to repopulate ... "ChrisR" wrote in message ... > Dont you need to update/ repopulate them both if data in ... > the underlying table changes? ...
      (microsoft.public.sqlserver.server)