SQL> spool /RealData/oracle/backup/emp1.txt SQL> SQL> !ls data_pump emp1.txt FGPS_BACKUP
SQL> select employee_id||','||last_name||','||salary||','||department_id from emp1; EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 198,OConnell,2600,50 199,Grant,2600,50 200,Whalen,4400,10 201,Hartstein,13000,20 202,Fay,6000,20 203,Mavris,6500,40 204,Baer,10000,70 205,Higgins,12008,110 206,Gietz,8300,110 100,King,24000,90 101,Kochhar,17000,90 EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 102,De Haan,17000,90 103,Hunold,9000,60 104,Ernst,6000,60 105,Austin,4800,60 106,Pataballa,4800,60 107,Lorentz,4200,60 108,Greenberg,12008,100 109,Faviet,9000,100 110,Chen,8200,100 111,Sciarra,7700,100 112,Urman,7800,100 EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 113,Popp,6900,100 114,Raphaely,11000,30 115,Khoo,3100,30 116,Baida,2900,30 117,Tobias,2800,30 118,Himuro,2600,30 119,Colmenares,2500,30 120,Weiss,8000,50 121,Fripp,8200,50 122,Kaufling,7900,50 123,Vollman,6500,50 EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 124,Mourgos,5800,50 125,Nayer,3200,50 126,Mikkilineni,2700,50 127,Landry,2400,50 128,Markle,2200,50 129,Bissot,3300,50 130,Atkinson,2800,50 131,Marlow,2500,50 132,Olson,2100,50 133,Mallin,3300,50 134,Rogers,2900,50 EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 135,Gee,2400,50 136,Philtanker,2200,50 137,Ladwig,3600,50 138,Stiles,3200,50 139,Seo,2700,50 140,Patel,2500,50 141,Rajs,3500,50 142,Davies,3100,50 143,Matos,2600,50 144,Vargas,2500,50 145,Russell,14000,80 EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 146,Partners,13500,80 147,Errazuriz,12000,80 148,Cambrault,11000,80 149,Zlotkey,10500,80 150,Tucker,10000,80 151,Bernstein,9500,80 152,Hall,9000,80 153,Olsen,8000,80 154,Cambrault,7500,80 155,Tuvault,7000,80 156,King,10000,80 EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 157,Sully,9500,80 158,McEwen,9000,80 159,Smith,8000,80 160,Doran,7500,80 161,Sewall,7000,80 162,Vishney,10500,80 163,Greene,9500,80 164,Marvins,7200,80 165,Lee,6800,80 166,Ande,6400,80 167,Banda,6200,80 EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 168,Ozer,11500,80 169,Bloom,10000,80 170,Fox,9600,80 171,Smith,7400,80 172,Bates,7300,80 173,Kumar,6100,80 174,Abel,11000,80 175,Hutton,8800,80 176,Taylor,8600,80 177,Livingston,8400,80 178,Grant,7000, EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 179,Johnson,6200,80 180,Taylor,3200,50 181,Fleaur,3100,50 182,Sullivan,2500,50 183,Geoni,2800,50 184,Sarchand,4200,50 185,Bull,4100,50 186,Dellinger,3400,50 187,Cabrio,3000,50 188,Chung,3800,50 189,Dilly,3600,50 EMPLOYEE_ID||','||LAST_NAME||','||SALARY||','||DEPARTMENT_ID -------------------------------------------------------------------------------- 190,Gates,2900,50 191,Perkins,2500,50 192,Bell,4000,50 193,Everett,3900,50 194,McCain,3200,50 195,Jones,2800,50 196,Walsh,3100,50 197,Feeney,3000,50 107 rows selected.
SQL> spool off
退出session,执行cat emp1.txt即可.