select s1.store_name,s2.stock_name,s.stocks,p.barcode,p.barcode1,p.prod_name from stock_history s,prod p,store s1,stock s2 where s.store_id = s1.store_id and s.stock_id = s2.stock_id and p.prod_id = s.prod_id and s.stamp like '2009-10-04%' and p.prod_sub_b_id = 181 INTO OUTFILE 'sony20091004' ;
這個會把產生的資料檔放在 DB 主機的路徑
而不是 client 的電腦裡哦
INTO OUTFILE
Re: INTO OUTFILE
代碼: 選擇全部
LOAD DATA INFILE 'data.txt' INTO TABLE db2.my_table;