自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

如何正確把Oracle數(shù)據(jù)導(dǎo)出成Txt 的格式?

數(shù)據(jù)庫(kù) Oracle
我們今天主要和大家分享的是Oracle數(shù)據(jù)導(dǎo)出成Txt 的正確格式的實(shí)際操作步驟的描述,以下就是正文的主要內(nèi)容描述。

以下的文章主要介紹的是如何正確的把Oracle數(shù)據(jù)導(dǎo)出成Txt 的格式,Oracle數(shù)據(jù)導(dǎo)出成Txt 在實(shí)際應(yīng)用中的比例還是比較常見的,以下的文章主要是對(duì)實(shí)際操作方案的描述,以下就是正文的主要內(nèi)容的描述。

Oracle數(shù)據(jù)庫(kù)提供的SQL功能很好很強(qiáng)大,用得越多越覺(jué)得自己淺薄無(wú)知。

上周做系統(tǒng)演示時(shí)需要手工制造一些文本數(shù)據(jù)充當(dāng)數(shù)據(jù)源,想偷偷懶就用了Toad工具直接查詢后導(dǎo)出成csv格式。今天正好有點(diǎn)時(shí)間,整理了一下思路,用sql去實(shí)現(xiàn)文本數(shù)據(jù)的生成。寫了大致框架,有空時(shí)再來(lái)完善吧。

步驟如下:

新建一個(gè)sql腳本 d:\czrk.sql,代碼如下: SET echo off

 

  1. SET feedback off  
  2. SET newpage none  
  3. SET pagesize 50000  
  4. SET linesize 20000  
  5. SET verify off  
  6. SET pagesize 0  
  7. SET term off  
  8. SET trims ON  
  9. SET heading off  
  10. SET trimspool ON  
  11. SET trimout ON  
  12. SET timing off  
  13. SET verify off  
  14. SET colsep |  
  15. spool d:\czrk.txt  
  16. SELECT sfzh || ',' || xm || ',' || xb || ',' 
    || csrq || ',' || mz|| ',' || xzqh|| ',' || jzdz FROM m_czrk WHERE rownum
    <=10000;  
  17. spool off   

 

Oracle數(shù)據(jù)導(dǎo)出成Txt格式:sqlplus連接上數(shù)據(jù)庫(kù),執(zhí)行腳本

  1. sqlplus dc/dc@mydb;  
  2. sqlplus>@d:\czrk.sql  

 

這樣就在d盤下生成了一萬(wàn)條數(shù)據(jù)了。

以上的相關(guān)內(nèi)容就是對(duì)把Oracle數(shù)據(jù)導(dǎo)出成Txt格式的介紹,望你能有所收獲。

【編輯推薦】

  1. Oracle Datafiles管理需要哪些項(xiàng)目?
  2. Oracle隨機(jī)函數(shù)的正確取法的描述
  3. Oracle Sql Trace在實(shí)際應(yīng)用中的問(wèn)題例舉
  4. Oracle查詢語(yǔ)句應(yīng)用經(jīng)驗(yàn)總結(jié)
  5. Oracle鎖的運(yùn)行機(jī)制原理的描述
責(zé)任編輯:佚名 來(lái)源: 博客園
相關(guān)推薦

2010-04-30 14:47:56

Oracle表

2010-05-06 15:29:53

Oracle數(shù)據(jù)復(fù)制

2010-04-01 08:47:09

Oracle函數(shù)

2010-04-29 11:53:42

Oracle數(shù)據(jù)庫(kù)

2010-04-26 18:32:48

Oracle數(shù)據(jù)庫(kù)

2010-05-07 13:03:01

Oracle通過(guò)存儲(chǔ)過(guò)

2010-05-05 11:17:55

Oracle數(shù)據(jù)庫(kù)

2010-04-02 13:46:30

Oracle數(shù)據(jù)導(dǎo)出

2010-10-28 11:55:47

oracle數(shù)據(jù)導(dǎo)出

2011-08-02 10:37:27

Oracle數(shù)據(jù)庫(kù)archivelog文

2010-05-10 16:25:15

Oracle組件

2011-04-08 14:45:08

文本數(shù)據(jù)Oracle

2010-01-05 14:49:03

JSON格式

2011-04-13 10:09:50

Oracle數(shù)據(jù)泵導(dǎo)入導(dǎo)出

2010-05-10 12:39:42

Oracle OCR鏡

2009-11-23 10:24:22

2011-04-15 10:37:53

Oracle導(dǎo)入導(dǎo)出語(yǔ)法

2010-04-22 10:16:43

2011-04-12 11:12:20

Oracle存儲(chǔ)過(guò)程

2010-05-10 10:46:07

Oracle存儲(chǔ)過(guò)程
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)