one of the best texts around is "the art of prolog, advanced programming techniques" 2nd edition, by leon sterling and ehud shapiro.
however, by now, it seems a bit dated (e.g. on the constraint logic programming side), so there is another recommendable text "programming prolog for artifical intelligence" by ivan bratko
so if you can afford, i would recommend both texts for self-study.