Licensing is state dependent. Some allow interns to have a training license allowing full ordering and prescribing privileges, others, like Kentucky, require 1 year of training before issuing a license (the intern can write orders and meds within the hospital system, but no scripts for outpatient medications). To top it off some institutions provide their residents with a DEA number, but others require the resident to get their own. You will find all this out when you match (or... gulp... scramble) into a program. They will guide you through the process of obtaining any licensing.