MySQL combining records from two tables with join and without

0

Please login or register to vote for this query.

(click on this box to dismiss)

MySQL combining records from two tables with join and without answer

Русский язык Meta

Q&A for лингвистов, этимологов, и энтузиастов русского языка

create table #threads (
id int
)

create table #posts (
id int,
thread_id int,
content varchar(10)
)

insert into #threads values (1)
insert into #threads values (1)
insert into #posts values (1, 1, 'Stack')
insert into #posts values (2, 2, 'OverFlow')


SELECT #threads.id AS 'threads.id' , #posts.id , #posts.content
FROM #threads, #posts

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results