别这样黑了,说不准的,万一有什么科技把我们的记忆存储起来放在机器人身上就可以活到9999年12月31号了呢,哇哈哈哈哈!!!!
2015-07-27
ALTER TABLE tdb_goods CHANGE goods_cate cate_id SMALLINT UNSIGNED NOT NULL,
CHANGE brand_name brand_id SMALLINT UNSIGNED NOT NULL;
CHANGE brand_name brand_id SMALLINT UNSIGNED NOT NULL;
2015-07-24
UPDATE tdb_goods INNER JOIN tdb_goods_brand ON tdb_goods.brand_name = tdb_goods_brand.brand_name SET tdb_goods.brand_name= tdb_goods_brand.brand_id;
2015-07-24
CREATE TABLE tdb_goods_brands
(
brand_id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
brand_name VARCHAR(30) NOT NULL
)
SELECT brand_name FROM tdb_goods GROUP BY brand_name;
(
brand_id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
brand_name VARCHAR(30) NOT NULL
)
SELECT brand_name FROM tdb_goods GROUP BY brand_name;
2015-07-24