|
-
September 27th, 2008, 05:26 PM
#1
Merging field rows together - mysql
I'm trying to get some rows from 2 separate columns and treat them as one field. For example, prop.title has 5 rows, tickets.title has 10 rows, I want to make a new field called main_title which has 15 rows, how do I do this? I can't find a way in sql of doing this in a query. I've searched for merge and lots of other things, but just keep finding CONCAT or group by etc.
Please help.
-
September 29th, 2008, 02:42 AM
#2
Re: Merging field rows together - mysql
Hi all.
If prop.title and tickets.title have the same data type, you can use the UNION operator.
For example
Code:
SELECT TITLE AS MAIN_TITLE
FROM PROP
UNION
SELECT TITLE AS MAIN_TITLE
FROM TICKETS
I hope this will help you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|