![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL
plasticplane
这个作者很懒,什么都没留下…
展开
-
防SQL注入
1.原理: 如执行语句: 点击(此处)折叠或打开 String sql = " select * from users where user_name = '" + name + " ' ; 正常情况下是非常合理的。原创 2013-11-01 14:47:16 · 435 阅读 · 0 评论 -
SQL查询语句优化
1. 避免全表扫描,尽量在已建立好的索引上进行查询,避免以下行为: 对某个字段进行is null 查询 或者 != 以及 对查询条件进行or并联,应该使用union合并两个单个集合。 若大量%操作,应考虑是否使用全文检索 避免使用参数查询,例:select * from student where sno = @sno 避免查询时包含表达式,或函数操作 2. 不要为了建立索引转载 2014-02-26 23:16:51 · 402 阅读 · 0 评论