Quantcast
Channel: w3it.org - world wide web Italia
Viewing all articles
Browse latest Browse all 10

Just discover how: SELECT MAX() value OR SELECT MAX() value and min together

$
0
0
MySQL vers. 5.6.10
Code:
SELECT Max(user_id) as uid, Max(username) as uname_clean FROM table
return correctly max userid row and related username value for same row,

WHILE for example:
Code:
SELECT username, Max(user_id) FROM table
will return max userid AND, the first username on table with lowest userid!

Viewing all articles
Browse latest Browse all 10

Trending Articles