Results 1 to 2 of 2

Thread: How to change the datatype of a column without dropping the table?

  1. #1
    Alex s Guest

    How to change the datatype of a column without dropping the table?

    Can anyone tell me how to change the datatype of a column.
    Without dropping and recreating the table...
    The table is empty...




    THNK YOU VERY MUCH...

  2. #2
    Charlie Larzalere Guest

    How to change the datatype of a column without dropping the table? (reply)

    Alex,
    This is something we all long for, unfortunately, it can't be done directly.

    Here's one way I use... If you have no referential integrity tied to the table, right click on the table, select 'Generate SQL Script...', and make sure the Drop and Create boxes are checked. Save the script and open it in Query Analyzer or ISQL/W. Change the datatype in the script, and run it.

    If you have referential integrity tied to the table, I'd suggest downloading DBArtisan from Embarcadero Technologies (www.embarcadero.com) for a trial period. You can change datatypes there, and it does all the work in the background for you. BTW, SQL 7 will allow you to change datatypes dynamically.

    Good luck,
    Charlie

    On 1/11/99 11:07:33 AM, Alex s wrote:
    > Can anyone tell me how to change the datatype of a column.
    Without
    > dropping and recreating the table...
    The table is empty...




    THNK
    > YOU VERY MUCH...

Posting Permissions

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