Sex while pregnant?

Can you have sex while in your early weeks of pregnancy? I'm very nauseous and I just don't know if it would work, or if I would throw up on him? 😂