Can I concatenate row values in SQL?
What SQL query will help me to concatenate two different tables with different numbers of rows? For example, I have one table with column1 and column2 and three rows, and second table with column3 and column4 and five rows. How can I make a third table with column1, column2, column3 and column4 and five rows in it (so that the last two rows, column1 and column2, are empty)?
The simple answer to this question is: you can't do this with SQL.
Copy and paste your data into Excel. Then find a way to import the Excel sheet into your new table. Relational databases are, fundamentally, about the relationships between data. Your data isn't related—or, if it is, you failed to describe how.
This was first published in November 2008