数据记录的增删改查

insert into `数据表名称` (`字段名称`, ...) values ('1', ...);
delete from `数据表名称` where 子句;
update `数据表名称` set (`字段名称`='1', ...) where 子句;
select * from `数据表名称`;
select (`字段名称`,...) from `数据表名称`;
select `字段名称1`*`字段名称2` from `数据表名称`;
select `字段名称1` as `别名1`, `字段名称2` as `别名2` from `数据表名称`;
select distinct from `数据表名称`;
select * from `数据表名称` where `字段名称` > 1;
select * from `数据表名称` where `字段名称1` > 1 and `字段名称2` < 2;
select * from `数据表名称` where `字段名称1` > 2 or `字段名称2` > 4;
select * from `数据表名称` where not in (1, 2);
select * from `数据表名称` where in (1, 2);
select * from `数据表名称` between 1 and 3;#类似大于等于1,小于等于3
select * from `数据表名称` where `字段名称` is null;
select * from `数据表名称` where `字段名称` like '值_' or '值%' or '%值%' or '%值';#下划线表示一个字符,百分号表示任意个字符
select * from `数据表名称` order by `字段名称` asc;
select * from `数据表名称` order by `字段名称` asc;
select * from `数据表名称` order by `字段名称1` asc, `字段名称2`desc;
select * from `数据表名称` limit 0, 1;
select count(`字段名称1`), max(`字段名称2`), min(`字段名称3`), sum(`字段名称4`), avg(`字段名称5`) from `数据表名称`;
select * from `数据表名称` group by `字段名称1` order by `字段名称2` desc;#分类排序
select * from `数据表名称` group by `字段名称1` having `字段名称2`='2';

最新文章

  1. 三周,用长轮询实现Chat并迁移到Azure测试
  2. Bootstrap &lt;基础十二&gt;下拉菜单(Dropdowns)
  3. 使用dom4j解析XML
  4. linux split 命令 将一个大的文件拆分成若干小文件
  5. 字符串--java中判断字符串是否为数字的方法的几种方法?
  6. BZOJ 2152: 聪聪可可 点分治
  7. synchronize学习
  8. (五)Struts2 标签
  9. Bootstrap_Javascript_按钮插件
  10. Hough Transform直线检测
  11. python进阶--打包为exe文件
  12. sql server事物控制
  13. java web项目中 读取properties 路径的问题
  14. Java利用内存映射文件实现按行读取文件
  15. React-Native 系列视频失效补链及一些碎碎念
  16. 使用vsftp服务传输文件
  17. faster-RCNN框架之rpn 较小目标检测,如果只使用rpn,并减少多个候选框
  18. Redis持久化AOF和RDB对比
  19. CF86D Powerful array
  20. STM32f103的数电采集电路的双ADC的设计与使用

热门文章

  1. MySQL 开启远程链接(localhost 以外的主机)
  2. HTML5 Geolocation(地理定位)
  3. Binding a Xamarin.Forms WebView to ReactiveUI View Model using Custom Type Converters
  4. Win10远程连接自己的电脑提示“登陆没有成功”的解决方案
  5. 【0521模拟赛】小Z爱划水
  6. mybatis or的用法
  7. 20189220 余超《Linux内核原理与分析》第五周作业
  8. SSM框架中,ContextLoaderListener与RequestContextListener的联系与区别
  9. 2019软工实践_Alpha(4/6)
  10. Weblogic部署web项目获取项目根目录为null