See man join. With join, you must use flat files, as it seeks in anticipation of Cartesian products. Files need to be header free, delimited and sorted. If this is a many to one or one to one deal (a simple merge), you could use my m1join.c tool and all piped data for the sort and header removal: Is there a 'fuzzy search' facility in Linux?
Another alternative is the JDBC and unixODBC drivers that treat flat text or CSV files as database tables, so you can express your desire in SQL to jisql or isql (unixODBC).