How to Query the Database to Find a Page with a Specific Label
Reason
To find all the pages created by a certain user and containing a specific label.
Procedure
Run the following query in the database:
SELECT * FROM CONTENT
WHERE CONTENTID IN (SELECT CONTENTID FROM CONTENT_LABEL
WHERE LABELID IN (SELECT LABELID FROM LABEL
WHERE NAME='<label name>' AND OWNER IN (SELECT USER_KEY FROM USER_MAPPING WHERE LOWER_USERNAME = '<username>')));
Be sure to replace <label name> with the actual label name you're looking for, and <username> with the username you're looking for.
You may need to modify the query for your database.
Last modified on Aug 30, 2016
Powered by Confluence and Scroll Viewport.