首页 > 数据库技术 > 详细

Sqlte 知识点记录

时间:2015-06-03 22:54:58      阅读:287      评论:0      收藏:0      [点我收藏+]

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"

 

Sqlte 知识点记录

原文:http://www.cnblogs.com/chenmfly/p/4550329.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!