例: 識別列およびINSERT ... SELECT - Teradata Database - Teradata Vantage NewSQL Engine - 例: 識別列およびINSERT ... SELECT

Teradata Vantage™ SQLデータ操作言語

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
2019年3月
Language
日本語
Last Update
2019-10-29
dita:mapPath
ja-JP/fbo1512081269404.ditamap
dita:ditavalPath
ja-JP/fbo1512081269404.ditaval
dita:id
B035-1146
Product Category
Software
Teradata Vantage

column_1table_1が、GENERATED BY DEFAULT識別列であるとします。

     INSERT INTO table_2 (column_1, column_2, column_3)
       VALUES (111,111,111);
     INSERT INTO table_2 (column_1, column_2, column_3)
       VALUES (222,222,222);
     INSERT INTO table_2 (column_1, column_2, column_3)
       VALUES (1,333,333);

     INSERT INTO table_1 (column_1, column_2, column_3)
     SELECT * FROM table_2;

table_1のすべての行を選択して、挿入操作の結果を検査します。

     SELECT *
     FROM table_1;
     *** Query completed. 3rows found. 3 columns returned.
     *** Total elapsed time was 1 second.
      column_1  column_2  column_3
     --------- --------- ---------
           111       111       111
           222       222       222
             1       333       333