前言:本文非原创 文章摘自:http://m.blog.csdn.net/blog/wsxzk123/17282325 数据库工具:MesaSQLite 一.创建1.创建数据库MesaSQLite工具 File-NewDataBase 创建出新的数据库(Newdb ...
前言:本文非原创 文章摘自:http://m.blog.csdn.net/blog/wsxzk123/17282325
数据库工具:MesaSQLite
一.创建
1.创建数据库
MesaSQLite工具 File-NewDataBase 创建出新的数据库(Newdb.rdb),这里我要的是.db的文件,自己手动把文件名改为.db。
2.创建table
进入MesaSQLite,选中structure,
二.查找
1.查找
select Distinct from 数据表 where 查询条件 order by field ASC|DESC group by field having 条件表达式
(1)distinct:表示查询的字段去除重复数; 可以是 * 表示从查询数据表中的所有字段
(3)group by、having
三.增删改
删除:delete 删除一列 (drop table)可以删掉某个表
更改:update 例如: update cityset name = "大理" ,cityID = 106,cityAddress = '云南省'where name = '苏州' and cityAddress = '江苏省'and cityID = 103
方式1:inner join
格式为
from (((表1 inner join 表2 on 表1.字段号=表2.字段号) inner join 表3 on 表1.字段号=表3.字段号) inner join 表4 on 表1.字段号=表4.字段号) inner join 表5 on 表1.字段号=表5.字段号 where ......
方法3
多重select
原标题:MesaSQLite数据库的简单使用方法
关键词:sql
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。