To clarify the above:
If you pay the debt off within one month of the judgement the court record (which is a public document) is deleted.
If you fail to pay the debt off within one month the court record remains in place for 6 years but you can apply to have it marked as 'satisfied' if you pay off the debt during that period. (There's a £15 fee involved).:
https://www.gov.uk/county-court-judgments-ccj-for-debt/ccjs-and-your-credit-rating
However credit providers aren't obliged to ignore old CCJs, even if they're no longer on the official register. For example, if you applied for credit now and the lender saw a CCJ on your record, you'd probably be refused credit. If you then applied for credit 10 years later (and then records still showed that you'd been refused credit in 2012) they would not be obliged to take the '6 year period' into account, and could still refuse you credit if they chose to do so.
Chris