多表更新的小问题
“多表更新一步到位”那一节有一个要注意的地方,大家可以尝试这样改一下:
CREATE TABLE tdb_goods_brands( brands_id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, brands_name VARCHAR(40) NOT NULL ) SELECT brand_name FROM tdb_goods GROUP BY brand_name; )
“多表更新一步到位”那一节有一个要注意的地方,大家可以尝试这样改一下:
CREATE TABLE tdb_goods_brands( brands_id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, brands_name VARCHAR(40) NOT NULL ) SELECT brand_name FROM tdb_goods GROUP BY brand_name; )
2016-03-27
举报