标签:
1、表存在
select count(*) from sqlite_master where type=‘table‘ and name=‘MyTable‘;
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;//复制 select username from users where username like ‘S%‘ ;//非重名字首字母为大写S的用户 select username from users where username like ‘__S%‘ ;//非重名字第三个字母为大写S的用户 select * from users where _id in(001,220,230); select * from user order by _id;//以id的顺序排列 select * from user order by _id desc;//以id反的顺序排
SELECT count(word) AS number FROM cet6_table; SELECT [word],[explanation] FROM cet6_table ORDER BY word LIMIT 100 OFFSET 200"
标签:
原文地址:http://www.cnblogs.com/chenmfly/p/4550329.html