INSERT INTO语句用法:
insert into m_new_car_sale(CAR_ID,TYPE,CAR_TYPE,PRICE,EXHAUST,VOLUME,TRANSMISSION,IMAGE) select carId,type,carType,price,fuel,displacement,transmission,image FROM m_new_car
INSERT INTO M_SUBCARTYPE(CARTYPE_ID,TYPE,IMAGE,CAR_ID,R_PRICE) SELECT carType,type,image,carId,price from m_new_car where carId>3008
insert into m_subcartype_price(subcartype_Id,price) select carId,price from m_new_car where carId>3008
抽取表结构:
mysqldump -u root -p -d --add-drop-table databaseName >d:\cartrader.sql
mysqldump -u root -p -d --add-drop-table databaseName >d:\dfsffr.sql
把数据导出到文件中
select subcartype_id,cartype_id,type,r_price car_id from m_subcarType where R_PRICE=0.00 into outfile "b.txt";