Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Why Do I Get An Error When Using Intersect With Mysql?


  • Please log in to reply
1 reply to this topic

#1 marjon76

marjon76

  • Members
  • 9 posts
  • OFFLINE
  •  
  • Local time:12:24 AM

Posted 27 July 2008 - 10:08 PM

Hi guys,
Well, sorry to bother you, but I have yet another MYSQL question.
Ok,
when I try executing this command:

mysql> SELECT PLAYERNO FROM PENALTIES
-> INTERSECT
-> SELECT PLAYERNO FROM TEAMS;

I end up with this eror:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT PLAYERNO FROM TEAMS' at line 3

I have no problems with either command on its own, (SELECT PLAYERNO FROM TEAMS; SELECT PLAYERNO FROM PENALTIES;) but when put with INTERSECT I get an error.
I get no errors when I try the same command using UNION.

What on earth is the problem?
I'd greatly appreciate your help.

Thanks
M

BC AdBot (Login to Remove)

 


m

#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:01:24 AM

Posted 30 July 2008 - 11:40 AM

As far as I know, MYSQL does not support intersects.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users