Compare two table and find matching columns

Posted by Karthick on Stack Overflow See other posts from Stack Overflow or by Karthick
Published on 2010-06-17T22:27:03Z Indexed on 2010/06/17 22:33 UTC
Read the original article Hit count: 110

Filed under:

Hi,

I have two tables table1 and table2, i need to write a select query which will list me the columns that exist in both the tables.(mysql)

I need to do for different tables (2 at a time)

Is this possible?

I tried using INFORMATION_SCHEMA.COLUMNS but am not able to get it right.

© Stack Overflow or respective owner

Related posts about mysql