How to compare the two tables and get the column name in mysql? -
i have 2 tables listed below.i need compare both tables , need unmatched column name possible in mysql ?
users +----+------------+ | id | login_name | +----+------------+ | 1 | chris | +----+------------+ | 2 | cherri | +----+------------+ users_temp +----+------------+ | id | login_name | +----+------------+ | 1 | chris1 | +----+------------+ | 2 | cherri | +----+------------+
so in case expected output want return login_name users_temp
table.how can ?
if want names don't match:
select u.id, u.login_name, ut.login_name users u join users_temp ut on u.id = ut.id , u.login_name <> ut.login_name;
note: finds users ids match, consistent how question phrased.
Comments
Post a Comment