I looked at the examples and instructions, so I did not understand how to combine queries correctly.
Answer 1, authority 100%
Answer 2, authority 100%
SELECT * FROM table_records AS T1 INNER JOIN table_categories as T2 ON T1.parent_id=T2.id INNER JOIN table_properties as T3 ON T1.props_id=T3.id WHERE T1.id=1;
Thus. get a record with ID=1 from
table_recordsand a parent element loaded to it from
table_categoriesand properties from
Requests are not joined via INNER JOIN. INNER JOIN joins tables in queries. To combine requests, it is enough to write them one after another in one script.
if the question is taken literally, then queries are perfectly connected, just like regular tables.
set nocount on create table #n1(id int, n varchar(20)) create table #n2(id int, n varchar(20)) insert into #n1 values (1, ' 1') insert into #n2 values (1, ' 2') insert into #n2 values (2, ' 2') select * from (select id, n from #n1) query1 join (select id, n from #n2) query2 on query2.id = query1.id drop table #n1 drop table #n2