Results 1 to 3 of 3

Thread: drop a column

  1. #1
    Lhot Guest

    drop a column

    Can somebody please tell me if it is possible to drop or remove a column of one table in sql 6.5? If not, what should I do if I really need to remove a column of one table? Should I recreate the table? whatabout its dependencies? and data that might me lost if I recreate the table???? thanks a lot!!!

  2. #2
    Jaya Guest

    drop a column (reply)


    You can't remove a column.

    Drop the constraints. copy the records to temp table. alter the original table to remove the column. append data from temp table.

    Jaya.

    ------------
    Lhot at 5/2/01 5:57:14 AM

    Can somebody please tell me if it is possible to drop or remove a column of one table in sql 6.5? If not, what should I do if I really need to remove a column of one table? Should I recreate the table? whatabout its dependencies? and data that might me lost if I recreate the table???? thanks a lot!!!

  3. #3
    Ananth Guest

    drop a column (reply)

    Just one point ...Jaya mentions alter the original table, but you really have to drop and recreate it without the unwanted column. SQL 6.5 does not support the DROP COLUMN option.

    After recreating the table, you need to reapply the constraints, re-compile any triggers etc. In 6.5, you should also recompile any/ all dependant stored procedures.


    ------------
    Jaya at 5/2/01 6:36:23 AM


    You can't remove a column.

    Drop the constraints. copy the records to temp table. alter the original table to remove the column. append data from temp table.

    Jaya.

    ------------
    Lhot at 5/2/01 5:57:14 AM

    Can somebody please tell me if it is possible to drop or remove a column of one table in sql 6.5? If not, what should I do if I really need to remove a column of one table? Should I recreate the table? whatabout its dependencies? and data that might me lost if I recreate the table???? thanks a lot!!!

Posting Permissions

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