SQL注入之数据库概述
Last updated
Last updated
查询当前数据库服务器所有的数据库
show databases;
选中某个数据库
use 数据库名字 test
查询当前数据库所有的表
show tables;
查询t1表所有数据
查询关键 select
* 所有
from 表名
select * from t1;
条件查询 id=2
where 条件 编程 if(条件 true){执行}
select * from t1 where id=2;
查询id=2 pass =111
union 合并查询
2个特性:
前面查询的语句 和 后面的查询语句 结果互不干扰!
前面的查询语句的字段数量 和 后面的查询语句字段数量 要一致
* == 3
select id from t1 where id=-1 union select * from t1 where pass =111;
order by 排序
order by 字段名字 id 也可以 跟上数字 1 2 3 4 .。。。。。
猜解表的列数 知道表有几列