sql注入常用指令

本文章仅用于记录我的学习,如有错误或者不足的地方欢迎指出

名称 作用 语法
avg() 返回数值列的平均值 select avg(column_name) from table_name
between() 选取介于两个值之间的数据范围内的,值可以是数值文本或者日期 select column_name from table_name where between value1 and value1
ceiling() 向上舍入为指定小数位数 ceiling(numerical,decimal place)
concat 多个字符串连接成一个字符串 concat(str1, str2,…)
concat_ws concat一样,将多个字符串连接成一个字符串,但是可以指定分隔符 concat_ws(separator, str1, str2, …)
Count(column_name) 返回指定列的值的数目NULL 值除外 select Count(column_name) from table_name
Count(*) 返回表中的记录数包括 NULL 值 select Count(*) from table_name
Count(distict column_name) 返回指定列的不同值的数目 select Count(distict column_name) from table_name
cast() 将某种数据类型表达式显式转换为另一种数据类型 select cast(expression as data_type)
floor() 向下舍入为指定小数位数 floor(numerical,decimal place)
format() 字段显示进行格式化 select format(column_name,format) from table_name
group by 根据一个或多个列对结果集进行分组 select group_concat(column_name,column_name) from table_name group by table_name
where 提取那些满足指定条件记录 select column_name from table_name where column_name operator value
if() 条件判断语句 if(condition,Tlue,False)
limit 用于限制查询结果返回的数量 select * from table_name limit index,quantity
lengh 获取字符串长度 select lengh()
lcase() 字段的值转换为小写 select lcase(column_name) from table_name
mid() 文本字段提取字符 select mid(column_name,start,[length]) from table_name
min() 返回指定列的最小值 select min(column_name) from table_name
max() 返回指定列的最大值 select max(column_name) from table_name
round() 四舍五入把原值转化为指定小数位数 round(numerical,decimal place)
Rand() 随机函数 随机出0到1的一个数 select Rand()
select 数据库中选取数据 select 数据名 from 数据库名
select disstinct 用于返回唯一不同的值 select disstinct column_name,column_name from table_name
show 列出数据库系统中所有的数据库 show databases or tables
substr 截取字符串的内容 substr(str,start,end)
Sum() 返回数值列的总数 select Sum(column_name) from table_name
Sleep() 休眠 select slepp(time)
top() 用于规定要返回的记录的数目 select top (numerical *) or (numericalpercent) from name
use 改变当前操作数据库 use 数据库名
ucase() 字段的值转换为大写 select ucase(column_name) from table_name
union 合并两个多个 SELECT 语句的结果 select column_name,… from table_name union select .....
union all 在union基础上可以允许选取重复的值 select column_name,… from table_name union all select .....

猜你喜欢

转载自blog.csdn.net/weixin_50599563/article/details/115313322