sql="CREATE TABLE IF NOT EXISTS MusicList (id integer primary key AutoIncrement,name varchar(20),path varchar(20))";
查看錶結構
desc <table>; sql
查看全部數據
select * from <table>; dom
查看指定的列數據
select , from <table>; 函數
查看非重複數據
select distinct , from <table>; spa
複製數據
insert into users(_id,username,password) select * from users; code
首字母爲S的數據
select username from users where username like 'S%' ; sqlite
第三個字母爲S的數據
select username from users where username like '__S%' ; rem
查詢001,220,230的數據
select * from users where _id in(001,220,230); 字符串
順序查詢
select * from users where _id in(001,220,230); it
反順序查詢
select * from user order by _id desc; io
獲取數據行總數
select count(word) as number from <table>;
分頁查詢
select , from <table> order by word limit 100 offset 200;
算術函數
字符處理函數
條件判斷函數
集合函數
其餘函數