获取数据代码

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP 100 
         p1.id AS id,
         p1.tags AS tags,
         CONCAT(p1.title, ' ', p1.body) AS question,
         'divide for search' AS dummy_col, -- 为该列指定一个虚拟的列名
         p2.body AS answer
FROM posts p1
INNER JOIN posts p2 ON p1.acceptedanswerid = p2.id
WHERE p1.tags LIKE '%<java>%'
    and p1.id > 0
order by p1.id;

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results