Hrm. I've always had it fairly free-form: ie, there's a Captain, an XO, and then the "2nd Officer," and onward down from there. But the "2nd Officer" isn't really a position all on its own insomuch as it is a title given to the next senior person on the ship.
That said, in my USS Perseus Campaign, beyond the Captain and the 1st officer (Commander), there's a Full Lieutenant Night Bridge Officer, Command branch, who is basically the one in charge during the night shift. While there are a few people on board who outrank him (ie: the Lt. Commander in Engineering, who is technically the '2nd officer' as well; and Lt. Commander Michael Barratt, the CMO), he's more "senior" during his shift: he would be in charge over the Doctor for sure, and depending on the situation, even the Chief Engineer.
Basically, it's a situational and plot driven idea to me: though technically it is a Captain, 1st Officer, 2nd Officer progression, there are other command officers, most notably that lieutenant, who, by virtue of being in the Command Track, have a bit more oomph than their rank would would suggest against the rank of a different department...
Hrm. I'm not sure if I'm making sense. Basically, I figure Command people should be a bit more ahead of the Ops/Engineering/Medical/Science folk...
The Doc
So you think, 'Might as well,
Dance a Tango to Hell,
at least I'll have Tangoed at all.'
-- "Rent," Jonathan Larson