oracle function MAX ([distinct | all] x)

[Function] statistics table to select rows x columns maximum.

 

Parameters all expressed selecting the maximum value of all values, only demand DISTINCT different maximum values, defaults to all

If there are distinct parameter or all, the need for space-separated with x (column).

 

Parameters x, may be numerals, characters or date fields

 

[Back] x corresponding to the field type

 

[Example]

surroundings:

create table table3(xm varchar(8),sal number(7,2));

insert into table3 values('gao',1111.11);

insert into table3 values('gao',1111.11);

insert into table3 values('zhu',5555.55);

insert into table3 values('',1111.11);

insert into table3 values('zhu',0);

commit;

 

Execution Stats:

select MAX(distinct sal),MAX(xm) from table3;

The results: 5555.55 zhu

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11119447.html