N
N
NikitoZ Sc.2015-12-29 20:08:27
MySQL
NikitoZ Sc., 2015-12-29 20:08:27

How to select data from multiple tables (not so easy :) )?

Welcome all! Here is such an interesting query that needs to be built, I don’t understand how:(
The essence (in short): there are two tables:
The first is
id, field_name
The second
is field_id,
value of this column - value from the second?Something like SELECT table2.value AS table1.field_name :)
Is it even possible in MySQL framework?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2015-12-29
@xmoonlight

select table1.field_name, table2.value FROM table1 LEFT JOIN table2 ON table1.id=table2.field_id;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question