Merge two csvs

I have two CSV files which share one column called database in common. I am looking to merge both CSVs into one. Here is a summary of what I am looking for.


Database Size freespace
DB1 100 50
DB2 80 55
DB3 90 40


Database MBXCount WhiteSpace
DB1 20 50
DB2 100 2
DB3 50 9

Desired file

Database Size freespace MBXCount WhiteSpace
DB1 100 50 20 50
DB2 80 55 100 2
DB3 90 40 50 9

Any help would be appreciated.

The PowerShell team made a blog post on this a couple years ago: Join-Object. As long as your set size is not too huge, it works great. (It doesn’t scale well; very slow when you’re trying to merge thousands of records.)

Thanks for the feedback. I actually went with merge-csv function. It did what I was looking for.