執行此腳本後,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 );