轻量级sqlite是增删改查
2024-10-01 04:28:02
--创建数据库
create database ios
--使用数据库
use ios
--创建数据表
create table student
(
stuid int primary key autoincrement,
stuname varchar(20),
stupwd varchar(20)
)
--查询所有信息
select * from student
--增加信息
insert into student(stuname,stupwd)
values ('lisi','123456')
--修改
update student set stuname = '李四'
where stuid = 1
update student set stuname = '李四',stupwd='Sd123'
where stuid = 1
--删除
delete from student where stuid=1
查询
1、查询所有信息
select * from student
2、查询表中的行数
select count(*) from student
3、降序排列
select * from student order by stuid desc
升序排列
select * from student order by stuid asc
4、分组
select count(*)from student group by stuname
最新文章
- 【Android群英传】学习笔记(三·一)
- HTML5 <;input>;添加多张图片,可点击弹窗放大。限定4张,可删除。
- RegExp正则校验之Java及R测试
- android 入门-微博分享
- 使用Javascript无限添加QQ好友原理解析
- 【解惑】让人头疼的";相等";关系
- 使用Jquery+EasyUI进行框架项目开发案例解说之中的一个---员工管理源代码分享
- 常用js代码学习
- cocos2d-x创建精灵动画
- Windows手动搭建PHP运行环境
- 关于“#ifdef __cplusplus”
- LeetCode OJ 101. Symmetric Tree
- IDL 实现 EOF(经验正交函数分析)
- JavaScript截取字符串的Slice、Substring、Substr函数简单比较还有indexof函数应用
- 基于docker 如何部署surging分布式微服务引擎
- Arrays和String单元测试(课下作业,选做)
- AI-跨域、垃圾回收、content_type组见、接口处理
- Visual Studio 2017 激活密钥 [复制记录]
- loj#2510. 「AHOI / HNOI2018」道路 记忆化,dp
- 【java】开发中常用字符串方法