can i buy a code reader that places like autozone and advanced auto use?

also, can those things clear codes as well, or only read them?

i know they're pretty expensive, like 1k or something from what i heard