Files
doc-exports/docs/dws/tool/dws_16_0066.html
luhuayi a5e3903f6b DWS TG 910.211 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: luhuayi <luhuayi@huawei.com>
Co-committed-by: luhuayi <luhuayi@huawei.com>
2025-04-23 13:53:01 +00:00

4.3 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 ;