To write the greatest 6-digit number having four different digits, we will have to use four largest digits. Clearly 9, 8, 7 and 6 are four largest digits. In order to write the largest 6-digit number using digits 6, 7, 8 and 9, we put the largest digit 9 at the place having the highest place value. The smallest digit 8 is put at the hundred's place, the smallest digit 6 is put at the right most place i.e. at unit's place and the digit 7 is put at the ten's place. All other places are filled by 9.
Hence, the required number = 999876.