标签:
sql="CREATE TABLE IF NOT EXISTS MusicList (id integer primary key AutoIncrement,name varchar(20),path varchar(20))";
查看表结构
desc <table>;
查看所有数据
select * from <table>;
查看指定的列数据
select , from <table>;
查看非重复数据
select distinct , from <table>;
复制数据
insert into users(_id,username,password) select * from users;
首字母为S的数据
select username from users where username like ‘S%‘ ;
第三个字母为S的数据
select username from users where username like ‘__S%‘ ;
查询001,220,230的数据
select * from users where _id in(001,220,230);
顺序查询
select * from users where _id in(001,220,230);
反顺序查询
select * from user order by _id desc;
获取数据行总数
select count(word) as number from <table>;
分页查询
select , from <table> order by word limit 100 offset 200;
算术函数
字符处理函数
条件判断函数
集合函数
其他函数
标签:
原文地址:http://www.cnblogs.com/zhangzhifeng/p/5644300.html