Whats better a 10.2 DSLRs or a 12.0 compact camera?

Okay so I don't know much about cameras.
I own a compact digital camera that is 12.0 mega-pixels but I want to buy a digital SLR camera and I was wondering if a DSLR camera that is 10.2 mega-pixels still takes pictures that are better quality than a 12.0 compact?
13 answers 13