intersection in SQL server 2000
hi,
What is the syntax for INTERSECTION Function in SQL server 2000?
I tried the following syntax, but it is not working
select <column_name> from <table_name1>
intersect
select <column_name> from <table_name2>
intersect({[1],[2]},{[1]})
these two r showing syntax error
Please, share ur knowledge about these
Thanks in advance,
Vishnu
Re: intersection in SQL server 2000
you can Use Inner Join for the operation of intersection
Re: intersection in SQL server 2000
What is the syntax for INTERSECTION Function in SQL server 2000?
I tried the following syntax, but it is not working
select <column_name> from <table_name1>
intersect
select <column_name> from <table_name2>
the error is:Incorrect syntax near the keyword 'intersect'.
Re: intersection in SQL server 2000
[QUOTE=vishnukumar;18131]hi,
What is the syntax for INTERSECTION Function in SQL server 2000?
I tried the following syntax, but it is not working
select <column_name> from <table_name1>
intersect
select <column_name> from <table_name2>
intersect({[1],[2]},{[1]})
these two r showing syntax error
Please, share ur knowledge about these
Thanks in advance,
Vishnu[/QUOTE]
Try this query in SQL server 2005
Re: intersection in SQL server 2000
select <column_name> from <table_name1> intersection
select <column_name> from <table_name2>