Rev 20:12

12 I saw the dead, the great and the small, standing before the throne. Books were opened. Another book was opened, which is the book of life. The dead were judged out of the things which were written in the books, according to their works. 

I saw the dead – all of the dead stand before the throne (Heb 9:27;  2 Cor 5:10).

and books were opened – that record every man’s deeds, including every idle word spoken (Matt 12:36); every angry word (Matt 5:22) and every act, whether good or bad.

and another book was opened – the book of life, for whoever hears Christ’s words and believes, has already passed from judgment into life (John 3:16; John 5:24).