關於sqlite3 top的查詢


其實,在sqlite3中沒有top的語法結構,但在sqlite3中有相關的語法能實現跟top語法相同的功能,sqlite3 sql是用limit這樣的語法來實現的;

如: select * from table where name='_安靜ゝ' order by id limit 0,10;

這個效果就相當於select top 10 * from table where name='_安靜ゝ'

如果還有更精確的:

select * from table where name='_安靜ゝ' order by date desc,id limit 0,10;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM