3, A, B, c three people playing cards, played a total of 100, the results of each disk are saved in the score table.
Please use SQL The statement identifies the maximum score of each of the three people in which innings, the output bureau number and the highest score.
Field name |
Property |
Note |
Id |
Int ( self-increment ) |
Bureau number |
Optiona |
Int |
The results of armour |
Optionb |
Int |
B's Results |
Optionc |
Int |
The results of C |
Answer:
CREATE TABLE Test (
Id Number (10),
Optiona Number (10),
OPTIONB Number (10),
Optionc Number (10)
);
INSERT into Test values (1,70,73,76);
INSERT into Test values (2,90,93,96);
INSERT into Test values (3,80,83,86);
SELECT * FROM Test
Select Id,optiona from Test where optiona= (select Max (optiona) from test)
Union
Select Id,optionb from Test where optionb= (select Max (optionb) from test)
Union
Select Id,optionc from Test where optionc= (select Max (optionc) from test);
(Welcome to the prawn to give a better answer)
2014-09-09 (Java Software Development Project--practical face question 3)