mysql调用dede创建数据表语句

时光怂恿深爱的人放手 提交于 2020-01-01 04:05:15

① show create table goods;

② CREATE TABLE `goods` (
 `goods_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
 `cat_id` smallint(5) unsigned NOT NULL DEFAULT '0',
 `goods_sn` varchar(60) NOT NULL DEFAULT '',
 `goods_name` varchar(120) NOT NULL DEFAULT '',
 `click_count` int(10) unsigned NOT NULL DEFAULT '0',
 `goods_number` smallint(5) unsigned NOT NULL DEFAULT '0',
 `market_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
 `shop_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
 `add_time` int(10) unsigned NOT NULL DEFAULT '0',
 `is_best` tinyint(1) unsigned NOT NULL DEFAULT '0',
 `is_new` tinyint(1) unsigned NOT NULL DEFAULT '0',
 `is_hot` tinyint(1) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (`goods_id`)
 )ENGINE=MyISAM DEFAULT CHARSET=utf8;


③ insert into prac.goods
select goods_id,cat_id,goods_sn,goods_name,click_count,goods_number,market_price,shop_price,add_time,is_best,is_new,is_hot from shop.ecs_goods;


update shu set num=floor(num/10)*10 where num>20 or num<40;

int(3) char(20) tinyint(1) int(2) date int(8) date char(200)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!