Computer Science, asked by KulsoomSiddiqui, 6 months ago

what is the use of intersection operator ​

Answers

Answered by krazykrotux75
0

Answer:

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.

Intersect Operator in Excel can be used to find the intersecting value(s) of two lists/ranges. This an unusual operator as it is represented by a space character (yes that's right). If you use a space character in between two ranges, then it becomes the Intersect operator in Excel.

Answered by mousmikumarisl
0

Answer :

The SQL INTERSECT operator returns the results of two or more SELECT statements.

Explanation :

  • The outcomes of two or more SELECT statements are returned using the SQL INTERSECT operator.
  • But all queries or data sets' chosen rows are the only ones that are returned. A record will be excluded from the INTERSECT results if it is present in one query but not the other.
  • The SQL Server INTERSECT function mixes the output of two or more queries and produces unique rows for each query.
  • The SQL Server INTERSECT's syntax is demonstrated by the following: INTERSECT
  • The queries in the syntax above must abide by the following rules, just like the UNION operator:
  • The number and arrangement of the columns in both queries must match.
  • The associated columns' data types must match or be compatible.
  • When two SELECT queries are combined using the INTERSECT clause in SQL, the dataset provided by the INTERSECT query is the intersection of the two SELECT statements' data sets.
  • Simply said, the INTERSECT statement will only return rows that are shared by both SELECT statements.

#SPJ2

Similar questions