Grouped query sql statement of the [Oracle] command used

Because they did not understand the depth of the oracle database, but the work they need to know some basic sql, sql statement so recorded under operation. View facilitate future

1. The packet sequence numbers as a condition of a query, the query results to filter out.

select t.serial_number,count(t.serial_number) from stamp_info t group by t.serial_number 
select t.serial_number,count(t.serial_number) from stamp_info t group by t.serial_number having count(t.serial_number) > 1;

 

Guess you like

Origin www.cnblogs.com/HeiDi-BoKe/p/11760474.html