I need to append Table1 to Table2 in such a way that no information is duplicated.
Example:
Table1
Name | Age
-------|-----
Jason | 30
John | 40
Joseph | 50
Bob | 60
Table2
Type
--------
Dog
Cat
Fish
I need a join to produce
Name | Age | Type
------|-----|-------
Jason | 30 | Dog
John | 40 | Cat
Joseph| 50 | Fish
Bob | 60 | NULL
So it only returns four rows and not 12 or more. There is no ID or other information that can relate the two tables.
Try this:
And check these:
ROW_NUMBER() in MySQL
http://craftycodeblog.com/2010/09/13/rownum-simulation-with-mysql/
http://jimlife.wordpress.com/2008/09/09/displaying-row-number-rownum-in-mysql/