運行此腳本後,dt3 將包含一列“a”。 在腳本中使用連接時,這可能會導致意外行為或需要手動刪除表中未使用的變量。 (例如:'SQL' 表變量自動添加到從 SQL 查詢返回的表中。)在 Concatenate() 中提供一個選項,以便在連接之前重命名重複的表變量,如果它們會導致新列。
Names default to here(1);
dt1 = New Table( "Test", Add Rows(1), New Table Variable( "a", 1 ) );
dt2 = New Table( "Test", Add Rows(1), New Table Variable( "a", 2 ) );
dt3 = dt1 << Concatenate( dt2 );