انت تستخدم اخر اصدار شكرا لك

  • More
  • أخر التعليقات

    SQL alter column datatype from nvarchar to int

     


    1. Create a new column that's an integer:

    ALTER TABLE tableName ADD newCol int;

    2. Select the data from the old column into the new one:

    UPDATE tableName SET newCol = CAST(oldCol AS int);

    3. Drop the old column.

    No comments :

    Post a Comment