為了理解這個概念,我們使用表格「薪水」中的數據,如下 -
mysql> Select * from Salary; +--------+--------+ | Name | Salary | +--------+--------+ | Gaurav | 50000 | | Rahul | 40000 | | Ram | 45000 | | Raman | 45000 | +--------+--------+ 4 rows in set (0.00 sec) mysql> Select * from salary12345 order by salary DESC limit 1 offset 1; +-------+--------+ | name | Salary | +-------+--------+ | Raman | 45000 | +-------+--------+ 1 row in set (0.00 sec)
以上是我們如何從 MySQL 表中取得員工第二高的薪水?的詳細內容。更多資訊請關注PHP中文網其他相關文章!