No, the second sentence isn't good English, I'm afraid. If you meant 'Do
you have any books', then it's fine.
The first sentence is grammatically correct, although 'any' is normally followed by a plural noun. Also, the sentence seems a bit unlikely, as it refers to one book only -- you're suggesting that someone might have only one book.