Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

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

    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!
Previously entered content was automatically saved. Restore or Discard.
Auto-Saved
x
Insert: Thumbnail Small Medium Large Fullsize Remove  
x
x
Working...
X