E
E
emerysh2017-06-09 00:18:28
MySQL
emerysh, 2017-06-09 00:18:28

How to compare fields from different tables?

Friends, the initial knowledge
is the task of making a price comparison table by the name of the product.
Available:
tab1: name, price
tab2: name, price
how to implement a price comparison table for all products?
name1 -price1 - price2 name2
-price1 - price2
How to make a comparison so that there are different prices opposite the name?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2017-06-09
@emerysh

Select t1.name1, t.1price1, t2.price2 from table 1 as t1
left join t2 on t1.name = t2. name
like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question