整形参数判断 1.直接加' 2.and 1=1 3. and 1=2 如果1.3运行异常 2正常就存在注入 字符型判断 1.直接加' 2.and '1'='1' 3. and '1'='2' 搜索型: 关键字%' and 1=1 and '%'='% 关键字%' and 1=2 and '%'='% 如果1.3运行异常 2正常就存在注入 获取数据库版本 and (select @@version)>0 获取当前数据库名 and db_n…
最近在加强sql 语句的学习,整理一下基本语法,现在记录下 select * from dbo.cangku where city='河南' select distinct(city), cangkuId from dbo.cangku //取消重复的列值 select SUM (gongzi) as zgz from dbo.zhigong //总工资 select cangkuId ,city from dbo.cangku where not city='河南'…
总结一些工作中用到或碰到的SQL语句,希望能与大家分享,同时也希望大家能提供更多的精妙SQL语句..... 1.delete table1 from (select * from table2) as t2 where table1.id=t2.id 2.truncate table table1 (不在事务日志中做记录,比delete table快,但不能激活触发器) 3.update table1 set column=column+1 where id=(select id from ta…