In the following example, the P_INTERSECT operator is used in the selection list.
SELECT period2 P_INTERSECT period1 FROM product_tests WHERE pid = 11804;
Assume the query is executed on the following table product_tests where period1 is a PERIOD(TIME(1)) column and period2 is a PERIOD(TIME(0)) column:
pid period1 period2 ----- ---------------------------- ------------------------ 11804 ('10:10:10.1', '11:10:10.1') ('10:10:10', '10:10:11') 10996 ('11:10:10.1', '11:40:40.1') ('10:10:10', '10:10:11')
The result is as follows:
(period2 P_INTERSECT period1) ----------------------------- ('10:10:10.1', '10:10:11.0')