How to select a maximum value row in mysql table

前端 未结 7 1590
感情败类
感情败类 2020-12-15 06:30

I have the following table

Table structure:

CREATE TABLE IF NOT EXISTS `people` ( 
`name` varchar(10) NOT NULL, 
`age` smallint(5) u         


        
7条回答
  •  鱼传尺愫
    2020-12-15 07:10

    try this

    SELECT age, name FROM  `people` where age = (SELECT max(age) FROM  people)
    

提交回复
热议问题