對這文章發表回應
發表限制: 非會員 可以發表
發表者: 冷日 發表時間: 2019/5/30 15:17:24
Oracle 用 Select 方式 Insert Table 資料
Oracle 用 Select 方式 Insert Table 資料, 用法有以下幾種 :
用法 1
用法 2
用法 3
用法 4
原文出處:昭佑.天翔: Oracle 用 Select 方式 Insert Table 資料
Oracle 用 Select 方式 Insert Table 資料, 用法有以下幾種 :
用法 1
insert into Table_Name
select col1
, col2
, ...
from Source_Table;
用法 2
-- 兩個 Table 架構要相同
insert into Table_Name
select *
from Source_Table;
用法 3
-- 若要 "使用 * 號, 且要外加其他欄位", 則 * 號前面要有 table alias name
insert into Table_Name
select table_alias.*
, col1
, col2
, ...
from Source_Table table_alias;
用法 4
-- 限定寫入的目的欄位有哪些
insert into Table_Name(
column1
, column2
, ...
)
select col1
, col2
, ...
from Source_Table;
原文出處:昭佑.天翔: Oracle 用 Select 方式 Insert Table 資料