How to make an octagonal prism

I wanna make an octagonal prism, how should i do this?

Add circle with 8 vertices, tab into edit mode, select all and extrude (constrain to Z-axis).