博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Sqlte 知识点记录
阅读量:6999 次
发布时间:2019-06-27

本文共 848 字,大约阅读时间需要 2 分钟。

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 
//查看表结构 select * from
//查询所有更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"

 

转载于:https://www.cnblogs.com/chenmfly/p/4550329.html

你可能感兴趣的文章