Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

confluence page list

Dear Support Team,

How can we use sql command to list pages title list by space? Thanks a lot.

2 answers

hello, you can use something like

SELECT c.contentid, c.contenttype, c.title
FROM CONTENT c
JOIN SPACES s
ON c.spaceid = s.spaceid
WHERE c.prevver IS NULL and s.spacename = 'your space name'

I don't have access to db atm, but believe it should work

"c.prevver is NULL" is used to get only actual versions of pages, also it should get you all contenttype, so you can add condition for it yourself

Davin Studer Community Leader Aug 26, 2019

You should also filter on CONTENT_STATUS to not get deleted page. Also, if you've set up your Confluence database according to their best practices then it might also be case sensitive collation. So, you would need to do something like this.

SELECT C.CONTENTID, C.CONTENTTYPE, C.TITLE
FROM CONTENT C
INNER JOIN SPACES S ON C.SPACEID = S.SPACEID
WHERE C.PREVVER IS NULL and C.CONTENT_STATUS= 'current' and C.CONTENTTYPE = 'PAGE' and S.SPACENAME = 'your space name'
Like Ilya Turov likes this
0 votes

Hello @Hsu Yao Chang ,

Have you tried other methods, such as using ‘Page Tree’ Macro?

QQ截图20190824201839.png

Thanks a lot. I know the method, but because I would like to join other table to filter other result. Is the other suggestion , such as sql command ?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

402 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you