Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有 1 个列名:PersonID它包含名称 ex john doe
PersonID
Table name: Person Column name: PersonID line1: John Doe line2: Doe john
现在提取最后一行?
此代码返回总行数,但不返回行文本
SELECT "PersonID", COUNT(*) FROM "Person";
降序排列,然后使用限制返回最后一行——现在在第一个位置!
SELECT * FROM Person ORDER BY PersonId DESC LIMIT 1
select * from Person order by PERSONID DESC Limit 0,1