How to Glue PVC & ABS Pipe
Never ever ask someone working in a hardware store how to glue plastic pipe. At best they'll say they don't know and at worst think they know. There is a reason they're working in a hardware store for near minimum wage and not as a $100/hour plumber.
Oatey has an excellent online video for beginners. Follow directions exactly.
PVC glue isn't a glue at all. They're solvents meant to weld plastic in a chemical process. The solvent must be matched to plastic for a weld to happen. PVC and ABS are similar and so you can get a weak weld using a "Transition" glue. Even using regular PVC glue rather than transition glue will get some weld. The transition glue is formulated to get a better weld than just PVC glue.
Of course the method for joining pipe really depends on what you need. You can use polyurethene glue, duct tape, etc... and claim it "works". But of course "work" is a relative term. If you're building a cage for hanging shade cloth over a plant most anything will work. If the pipe will be under pressure and "work" means the strongest and recommended method then only PVC and PVC primer and glue will "work". ABS isn't designed for pressure. But of course Uncle Ernie will tell you that's all BS and he used ABS for hot and cold water in his house and it worked fine.
Transition glue is meant only for vent and drains. Non-pressure. Some local codes do not even allow that.
There is a glue (solvent) just for ABS. Oatey ABS glue comes in a black can. No primer is needed but there's a PVC/ABS cleaner you're suppose to use.<\p> PVC glue requires a primer.
There's also a glue for grey PVC electircal conduit.<\p>