随笔分类 -  SQL

摘要:SELECT id,autonum FROM program WHERE autonum IN (202000016,202001072) order by FIELD(autonum,202000016,202001072); 阅读全文
posted @ 2020-10-21 20:18 Tudoo 阅读(619) 评论(0) 推荐(0)
摘要:MySQL修改用户的密码主要有两种方法:ALTER USER 和SET PASSWORD ALTER USER 基本使用 ALTER USER testuser IDENTIFIED BY '123456'; 修改当前登录用户 ALTER USER USER() IDENTIFIED BY '123 阅读全文
posted @ 2020-08-22 00:51 Tudoo 阅读(454) 评论(0) 推荐(0)
摘要:http://blog.codinglabs.org/articles/theory-of-mysql-index.html 阅读全文
posted @ 2020-05-11 10:57 Tudoo 阅读(122) 评论(0) 推荐(0)
摘要:在使用SpringDataJpa的时候,有时候查询非常慢,这时候可以通过添加@Query注解,使用原生SQL语句进行查询 通常返回类型是List<Object[]> 在一对多的时候,可以通过left join right join inner join查询 但三者之间是有区别的 left join( 阅读全文
posted @ 2020-03-12 23:16 Tudoo 阅读(372) 评论(0) 推荐(0)