运行此脚本后,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 );