Jump to content

MySQL, MERGE, and Union


ThePsion5

Recommended Posts

Hi,I have two MySQL tables that form part of a resume database and I'm trying to create a MERGE table in MySQL that uses information from both of them. Now, according to the documentation it seems like I can use standard UNION syntax and combine two select statements in the union clause, but MySQL returns a syntax error when I attempt to do this. Here's my table creation SQL:

CREATE TABLE MergedProjectFullInfo(ProjectTitle VARCHAR(120),Description TEXT,Placename VARCHAR(120),SkillID INTEGER UNSIGNED,SkillName VARCHAR(120),SkillType VARCHAR(120),Relevance TINYINT UNSIGNED)ENGINE=MERGE UNION=((...FIRST SELECT STATEMENT)(...SECOND SELECT STATEMENT))

I'm wondering if I can only specify exact tables instead of being able to use the standard UNION syntax, which is the impression I was under previously. Thanks in advance!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...