Software Testing

k2G9Eo9
RdZQRt6

Popular Posts

INTERSECT


The SQL INTERSECT clause/operator is used to combine two SELECT statements but returns rows only from the first SELECT statement that are identical to a row in the second SELECT statement. This means INTERSECT returns only common rows returned by the two SELECT statements. Just as with the UNION operator, the same rules apply when using the INTERSECT operator. MySQL does not support INTERSECT operator
The basic syntax is as follows:
SELECT Column1, column2, ... column_n 
FROM tables
WHERE conditions 
INTERSECT 
SELECT
 Column1, column2, ... column_n 
FROM tables 
WHERE conditions;

No comments:

Post a Comment