开发者

mysql alter to table

开发者 https://www.devze.com 2023-02-11 03:23 出处:网络
I drop the mysql alter code below to database via phpmyadmin one by one, it it work fine, is there anyone could help me how to drop it all together at once? Or do you know the the samples of PHP code

I drop the mysql alter code below to database via phpmyadmin one by one, it it work fine, is there anyone could help me how to drop it all together at once? Or do you know the the samples of PHP code that may execute it? Just let me know please.

ALTER TABLE `user` ADD `title`
varchar(16) COLLATE utf8_bin NOT NULL DEFAULT '' AFTER `user_id`

ALTER TABLE `customer` ADD `title`
varchar(16) COLLATE utf8_bin NOT NULL DEFAULT '' AFTER `customer_id`;

ALTER TABLE `customer` ADD `date_birtdate` datetime NOT NULL 
 DEFAULT '0000-00-00 00:00:00' AFTER `lastname`;

ALTER TABLE `customer` ADD `security_question` varchar(96) COLLATE utf8_bin 
  NOT NULL DEFAULT '' AFTER `fax`;

ALTER TABLE `customer` ADD `security_answer` varchar(96) COLLATE utf8_bin 
  NOT NULL DEFAULT '' AFTER `fax`;

ALTER TABLE `customer` ADD `pin_number` text COLLATE utf8_bin AFTER `password`;

ALTER TABLE `customer` ADD `notes` text COLLATE utf8_bin AFTER `bank_number`;

ALT开发者_如何学运维ER TABLE `customer` ADD `last_active` datetime NOT NULL 
  DEFAULT '0000-00-00 00:00:00' AFTER `date_added`;


add ; at end of each query ;-) then u can put them together as one block. with php you can't do it that easy way.

0

精彩评论

暂无评论...
验证码 换一张
取 消