测试中SQL常用到的函数

1、比较datetime类型的日期,例如数据库中的存储类型是datetime,查询日期为"2020-4-19"的值就用 select   * from table where  date(time)=“2020-4-19

2、查询表中不同列的计数

 select count(distinct 列名)from 表名

posted @ 2020-04-19 15:28  kittyy  阅读(304)  评论(0编辑  收藏  举报