A boozed up detective who was on duty accidentally shot his own partner in the wrist in Queens while investigating a robbery, police sources said.

The injured detective was taken to Jamaica Hosptial where he was undergoing surgery, the sources said.

The NYPD’s Internal Affairs Bureau is investigating. Both cops work out of the 75th Precinct in East New York.