0
比方說,我的數據庫表結構就像導出到CSV文件,從數據庫:通過傳遞一些常量字符串變量
he haddress hage she saddress sage
Sam USA 25 Jenny germany 21
John UK 32 Anne france 29
keith USA 27 nicole france 21
我想導出這個aboce結果使用此命令設置成csv文件:
select he, haddress, hage, she, saddress, sage into outfile '/tmp/test1.csv'
fields terminated by ','
lines terminated by '\n' from table_name;
它創建的CSV文件格式如下:
Sam,USA,25,Jenny,germany,21
John,UK,32,Anne,france,29
keith,USA,27,nicole,france,21
現在我想在上面如下:
Sam,address,USA,age,25,knows,Jenny,address,germany,age,21
.....
.....
.....
如何在生成csv文件時傳遞這些字符串。
它是否適用於oracle 11g? – Abhi