首頁>Club>
4
回覆列表
  • 1 # 使用者6402498393847

    1>create table ... as select ..,表不存在的情況下,建立表並且複製資料。oralce中表不存在的情況下用此語句。

    create table newTable as select * from soruceTable

    2>insert into ...select from...,表存在的情況下,複製資料,oracle中可以用此語句複製資料。

    insert into targetTable(value11,value12..) select from value21,balue22 from sourceTable

    3>select ...into ... from ..,表不存在的情況下,建立表並且複製資料,在plsql中直接執行會報錯,需要再塊中執行。

    select value11,value12... into newTable from sourceTable

    4>完全複製表(包括建立表和複製表中的記錄)create table test as select * from bs_log --bs_log是被複製表

  • 中秋節和大豐收的關聯?
  • 蘋果6plus在來電響鈴一聲後就不響了是什麼原因?