I need to find all the table names alone in all select statements in my query log. Is there any way to grep
(or) any other option, to take the strings that comes immediately after the word FROM
in my file ..
Example: file
contains something like this
select a, b, c FROM `table1` join `table2` etc...
insert into.................
commit
select * FROM `tablex` ..............
select y,s,h FROM `tabley`.................
.
.
.
Now I want the list of the distinct tables alone from the select stmts. i.e,
table1
tablex
tabley