B
B
BranchInCode2020-05-16 14:18:11
MySQL
BranchInCode, 2020-05-16 14:18:11

How to implement join of two tables without duplicate id columns?

Query: SELECT * FROM reg_admin JOIN more_people_info ON reg_admin.user_id = more_people_info.user_id Result
: 5ebfcba857fff977604443.png

That is, you need to display user_id only at the beginning, and remove the one in the middle

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Gordinskiy, 2020-05-16
@DmitriyGordinskiy

Well, list all the required columns, instead of *

D
Dmitry Derepko, 2020-05-16
@xEpozZ

SELECT reg_admin.*, more_people_info.{список полей, которые нужны из этой таблицы}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question