MySQL re scheduling query

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

The GROUP BY statement can achieve a column to re query.

Direct statement:
select io_dev_id from io_info where (TID=1 AND host_name='yang1') GROUP BY 1,
According to io_dev_id to query.
P: conveniently distinguish coupled with ORDER BY and distinct use
GROUP BY is chosen according to the column
ORDER BY is based on the column sorting
Distinct GROUP is similar to BY, but can only be placed behind select, field front screening.
Such as: select distinct a,b,c from tb1;
The selected a, B, C three column values are the same data.
The removal of MySQL 5.6 reference manual content:
In most cases, a DISTINCT clause can be considered as a special case of GROUP BY. For example, the following two queries are equivalent:
SELECT DISTINCT c1, c2, c3 FROM t1
WHERE c1 > const;
SELECT c1, c2, c3 FROM t1
WHERE c1 > const GROUP BY c1, c2, c3;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Fannie at December 14, 2013 - 6:37 PM