Node 数据库1

VARCHAR字符串

字段id 类型INT 额外 auto_increment 设为主键

增加 插入
insert into 表名(列名1,列名2,....)values(值1,值2....),(值1,值2....)
删除
delete from 表名 where 条件表达式
注:条件表达式->列名=值 列名<值 列名>值
修改
update表名 set 列名1=值1,列名2=值2 where条件表达式
查询
1.查询全部
select*from表名
2.查询全部列
select 列名 from 表名
3.按条件查询
select*from 表名 where 条件1 and 条件2
4.模糊查询
select*from 表名 where 列名 like “%val%” 查询数据中带val的
select*from 表名 where 列名 like “val%” 查询数据以val开头的
select*from 表名 where 列名 like “%val” 查询数据以val结尾的
5.限制条数
select*from 表名 limit 开始下标(0),条数

 

posted @ 2018-10-22 15:58  maps..xy  阅读(118)  评论(0编辑  收藏  举报