Along the same lines, was Scotty or McCoy ever given command of anything? Scotty presumably is the second officer and though McCoy runs the sick bay (the way Spock presumably runs sciences) and has been on expeditions, do either men have actual command experience outside of taking over temporarily when Kirk or Spock are gone?
As has been pointed out, I don't believe we've ever seen McCoy being given command of any sort. Of course, he's in charge of the medical division, but that's a bit different. But even though he has a senior officer's rank, he doesn't necessarily have command training. He certainly has shown on more than one occasion that his interest is solely in being a doctor. He's not at all interested in the military aspects of Starfleet or even that much in the exploration aspects, unless they happen to coincide with his medical interests. He just wants to help sick people. So he may have done what was necessary within the structure of Starfleet to achieve the medical post he wanted, but not have pursued any sort of command training. In fact, in "The Menagerie," we see that McCoy places Spock under arrest given his senior officer status, but command is transferred to Hansen, presumably because Hansen has command training and McCoy does not. After all, we learn in TNG that Dr. Crusher having command training was an optional thing she chose.
As for Scotty, he most definitely has command training, and is left in charge of the Enterprise on many occasions, but again he seemed someone who was specifically devoted to his engineering talents. Again looking at TNG, he defers to LaForge and allows him to take command, saying that even though he was a captain in rank, he never wanted to be anything other than an engineer. So it seems reasonably likely that he went through command training, and was perfectly capable of commanding the Enterprise when the situation warranted, but had no interest in actually commanding his own ship.
Regarding the Scotty/Sulu thing, I don't think we ever got a clear definition of the command structure of the Enterprise. Obviously, Kirk was in command and Spock was the first officer. Given the number of times he was put in command throughout the course of the series, I think it's reasonable to assume Scotty was the second officer as well as chief engineer.
Beyond that, it gets murky. Sulu was seen in command on many occasions too, so he could perhaps be the fourth in line. Chekov was way too junior an officer at that point to have held that post, so I think we'd count him out. But what about Uhura? We never see her in command, save for the animated series, but she is the same rank as Sulu and has lots of bridge experience. And we see in several episodes that she's capable of manning other stations, like navigation. She could have easily have had command training too. Nichelle Nichols asserts in her autobiography that Uhura was fourth in command, but we know what that's worth...
