摘要:
一、一些常用的SQL实践 (1)负向条件查询不能使用索引 select * from order where status!=0 and stauts!=1 not in/not exists都不是好习惯 可以优化为in查询: select * from order where status in( 阅读全文
posted @ 2020-08-19 23:18
少说点话
阅读(109)
评论(0)
推荐(0)
摘要:
初始化测试数据 我们有如下一张 product 订单表,相关字段分别为产品名称,订单数量,订单时间。 DDL: -- -- Table structure for product -- DROP TABLE IF EXISTS `product`; CREATE TABLE `product` ( 阅读全文
posted @ 2020-08-19 22:47
少说点话
阅读(348)
评论(1)
推荐(0)

浙公网安备 33010602011771号