![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库操作
裹着被子吹空调
这个作者很懒,什么都没留下…
展开
-
Mysql常用函数
查看当前用户权限SHOW GRANTS FOR CURRENT_USER()原创 2022-03-03 14:32:59 · 350 阅读 · 0 评论 -
mysql 索引失效的情况
mysql 索引失效的情况在索引列上进行运算(使用了内置的函数)select * from tableA where length(columnA)=12查询字符串类型的列不加单引号select * from tableA where columnA= ssadas头部模糊匹配select * from table A where columnA='_呢哇'or链接条件有一处没有索引--columnA 有索引 columnB 没索引select * from tabl原创 2022-02-18 20:58:09 · 275 阅读 · 0 评论 -
postgres 查看指定 模式下表的数量
一般在postgresql中,表的信息都在pg_tables表中:SELECT count(tablename) FROM pg_tables where schemaname = 'scheme_name_XXX'原创 2022-02-17 11:23:57 · 1160 阅读 · 0 评论 -
Postgres 常用函数
Postgres 常用函数1、若某字段为null 则转化成0select coalesce(t2.sal, 0) from table2 t2;原创 2022-02-16 16:35:40 · 253 阅读 · 0 评论