webguync Posted April 15, 2009 Share Posted April 15, 2009 Hi, I need a SQL statement that will pull out all of the data from the fields in Table A and also combine info from just one field in table B. I am having difficulty coming up with the right SQL statement. I tried UNION, but since all there are an uneven number of columns in each table that didn't work. Also tried LEFT JOIN, but that doesn't work because the two tables don't share any common columns. Any ideas on the best method? Quote Link to comment Share on other sites More sharing options...
Mchl Posted April 15, 2009 Share Posted April 15, 2009 If these tables do not share any columns, how MySQL is supposed to return any meaningful data? Care to give an example of data in tables, and what you would like to get? Quote Link to comment Share on other sites More sharing options...
webguync Posted April 15, 2009 Author Share Posted April 15, 2009 my bad, they did have a common column (duh). I think I have what I needed with the LEFT JOIN. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.