如何在MySQL Query上运行它

时间:2013-11-30 04:02:33

标签: mysql

我不想改变这一点。

来自

equip mediumint(8) unsigned NOT NULL default '0',

equip int(11) unsigned NOT NULL default '0',

slotchange SMALLINT(3) unsigned NOT NULL default '0',

moves int(11) unsigned NOT NULL DEFAULT '0',

char_opt INT( 11 ) unsigned NOT NULL default '0',

unban_time int(11) unsigned NOT NULL default '0',

type enum('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U') NOT NULL default 'P',

type enum('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','$') NOT NULL default 'P',

1 个答案:

答案 0 :(得分:2)

以下是查询:
装备栏:

ALTER TABLE your_table MODIFY COLUMN equip int(11) unsigned NOT NULL default '0'

slotchange to moves:

ALTER TABLE your_table CHANGE slotchange moves int(11) unsigned NOT NULL DEFAULT '0'

char_opt to unban_time:

ALTER TABLE your_table CHANGE char_opt unban_time int(11) unsigned NOT NULL default '0'

键入列:

ALTER TABLE your_table MODIFY COLUMN type enum('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','$') NOT NULL default 'P'

MODIFY用于更改列的数据类型和其他属性,CHANGE用于更改表列的名称和其他属性。
哦,然后逐个运行查询:D