Let us create two tables blog1 and blog2.
--------------------------------------------------------------------------------------------------------------------------
Create Table blog1
(
Id int primary key,
Name
Gender
)
Go
Insert into blog1 values (1, '
Insert into blog1 values (2, 'xxx', 'F')
Insert into blog1 values (3, '
Insert into blog1 values (4, '
Insert into blog1 values (5, 'yyy', 'F')
Go
-------------------------------------------------------------------------------------------------------------------
Create Table blog2
(
Id int primary key,
Name
Gender
)
Go
Insert into blog2 values (4, '
Insert into blog2 values (5, 'yyy', 'F')
Insert into blog2 values (6, '
Insert into blog2 values (7, '
Insert into blog2 values (8, '
Go
---------------------------------------------------------------------------------------------------------------------
Now execute both the tables.
------------------------------------------------------------------------------------------------------------------
Now execute the following query.
intersect
Now the result will be as follows.
No comments:
Post a Comment