Bolts are the most used fastening materials for pipes in steel piping. They can be without head i.e. studs or with hexagonal heads i.e. machine bolts. They can be either fully threaded or partially threaded.
As per ASME B16.5, one can use either square head machine bolts or studs for making a joint.