What syntax would I use to query the entire database?

I would like to select a row from two different tables that are relational. I would just put

SELECT * FROM 'said database' WHERE my condition = 'mycondition' blah blah.

Or is it some other syntax method?

Please, help.:)

All answers are greatly appreciated.

+3
source share
4 answers

This (approximately) will do the trick for you.

select <data> from table1
inner join table2 on table1.column = table2.column
where <mycondition>

Learn more about joins from the MySQL Guide .

0
source

Try the following:

SELECT * FROM TableA A INNER JOIN Table B ON A.Id = B.Id WHERE condition = 'mycondition'
+3
source

- :

Select * from Table1 inner Join Table2 ON Table1.field_condition_from_table_1 = Table2 .field_condition_from_table_2 where Table1.condition_from_table_1 = "your_condition"

. , , , , .

+2

.

0

Source: https://habr.com/ru/post/1735060/


All Articles