O'Reilly logo

SQL Injection Attacks and Defense, 2nd Edition by Justin Clarke-Salt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

select owner,table_name from all_tables;

You can enumerate some more information about your application tables to determine the number of columns and rows that are present in the tables as follows:

select a.table_name||‘[‘||count(∗)||’]=’||num_rows from user_tab_columns a,user_tables b where a.table_name=b.table_name group by a.table_name,num_rows

EMP[8]=14

DUMMY[1]=1

DEPT[3]=4

SALGRADE[3]=5

And you can enumerate the same information for all accessible/available tables, including their users, table names, and the number of rows in these tables as follows:

select b.owner||‘.’||a.table_name||‘[’||count(∗)||‘]=’||num_rows from all_tab_columns a, all_tables b where a.table_name=b.table_name group by b.owner,a.table_name,num_rows

Finally, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required