Home > Database > Mysql Tutorial > mysql-MySQL查询的语句求助,查询不重复一览

mysql-MySQL查询的语句求助,查询不重复一览

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:34:44
Original
929 people have browsed it

mysqlsql

有如下的表:
CREATE TABLE loginlog (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
username VARCHAR(100) DEFAULT NULL,
operate VARCHAR(512) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=MYISAM AUTO_INCREMENT=1 DEFAULT CHARSET=gbk

表内相同username的数据很多,id是自动增量列;
希望用一条SQL语句,查出最新id的username+operate一览,要求结果内username不重复,请帮忙写SQL语句,谢谢!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template