Home > Database > Mysql Tutorial > SQL在有数据情况下更改列的数据类型的方法_MySQL

SQL在有数据情况下更改列的数据类型的方法_MySQL

WBOY
Release: 2016-06-01 13:50:43
Original
1314 people have browsed it

bitsCN.com

    First, remove (or DROP) the PK-FK relationship,

ALTER the column,

then re-establish the relationship.
所有步骤在sql企业管理器中实现

第一步: 去掉所有 关系。 打开设计表,然后就可以去掉表的相关关系

第二部: 改变列的数据类型 。我做的是从 varchar(2) 到 bit 的转变,其他相关的我感觉也该能进行相互转变

第三部: 恢复第一步中去掉的所有关系

goog !祝你好运!!!

 

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template