達夢資料庫外部表的使用

2021-10-06 06:54:20 字數 528 閱讀 7942

外部表就是資料不在資料庫中,而是將外部的檔案通重載入的形式鏈結到資料庫中。

例子:1. 外部的資料

[dmdba@dw01 dm]$ cat test.txt

1,a2,b

3,c4,d

2. 編寫控制檔案

[dmdba@dw01 dm]$ cat test.ctl

load data

infile '/dm/test.txt'

into table test

fields ','

3. 建立外部表

sql> create external table test (id int,name varchar(20)) from '/dm/test.ctl';

注意:外部表不支援 insert delete update, 如需進行dml只能在該檔案本身中操作。

外部表庫可以使用軟連線和硬連線檔案。

達夢資料庫外部表

外部表,是指不存在於資料庫中的表。通過向達夢提供描述外部表的元資料,我們可以把乙個作業系統檔案當成乙個唯讀的資料庫表,就像這些資料儲存在乙個普通資料庫表中一樣來進行訪問。外部表是對資料庫表的延伸。建立簡單的達夢外部表的過程 1.假設外部資料在test.txt中 dmdba localhost cat...

達夢資料庫如何使用外部c函式

1.在linux 上編輯乙個 concat.c 的檔案,內容如下 include include include de pub.h de data c concat de args args 2.編譯一下,得到 so檔案 這裡需要先將達夢資料庫安裝上,依賴 include 目錄下的相關檔案 gcc ...

達夢資料庫使用

1 修改最大連線數 先檢視當前的最大連線數 select sf get para value 2,max sessions 修改最大連線數 alter system set max sessions 1000 spfile 重啟資料庫 su dmdba cd dmdbms dmservicedmse...