Convert BIGINT UNSIGNED to INT

后端 未结 3 1371
无人共我
无人共我 2021-02-13 07:21

I know it is unorthodox and potentially dangerous to want to convert something from a larger to a smaller sized data type. However, in this case, it is extremely unlikely that t

3条回答
  •  佛祖请我去吃肉
    2021-02-13 07:25

    I unfortunately did not have the right to create functions on the DB where I was working, so after trying a few things this worked:

    ALTER TABLE table_name MODIFY column_name INTEGER;
    

    Saved me having to rewrite 15 foreign keys.

提交回复
热议问题