forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: Lu, Huayi <luhuayi@huawei.com> Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
4.6 KiB
4.6 KiB
SET
SET is a unique feature in Teradata. It does not allow duplicate records. It is addressed using the MINUS set operator. Migration tool supports MULTISET and SET tables. SET table can be used with VOLATILE.
Input: SET TABLE
1 2 3 4 5 | CREATE SET VOLATILE TABLE tab1 ... ; INSERT INTO tab1 SELECT expr1, expr2, ... FROM tab1, ... WHERE .... ; |
Output
1 2 3 4 5 6 7 | CREATE LOCAL TEMPORARY TABLE tab1 ... ; INSERT INTO tab1 SELECT expr1, expr2, ... FROM tab1, ... WHERE .... MINUS SELECT * FROM tab1 ; |
Parent topic: Migrating Tables