SQL でページやブログ投稿のコメントを取得する方法

プラットフォームについて: Cloud と Data Center - この記事は クラウド プラットフォームとデータセンター プラットフォームの両方に等しく当てはまります。

Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。

*Fisheye および Crucible は除く

要約

Confluence considers Comment on pages and blog posts as content and it holds the metadata of the comments in the CONTENT table and the data itself in the BODYCONTENT table.

ソリューション

If you want to retrieve all the comments in your Confluence instance, you can use the following SELECT statement:

SELECT * FROM BODYCONTENT WHERE CONTENTID IN ( SELECT CONTENTID FROM CONTENT WHERE CONTENTTYPE = 'COMMENT')

To fetch the comments of an individual page, you can use the following statement (replacing the <pageID> tags):

SELECT * FROM CONTENT C INNER JOIN BODYCONTENT B ON C.CONTENTID = B.CONTENTID WHERE C.CONTENTTYPE='COMMENT' AND PREVVER is null AND CONTENT_STATUS = 'current' and pageid=<pageID>

関連コンテンツ:

更新日時: September 25, 2025

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。