Extracting the lines between 2 strings of a file

Hi,

I have a sql file and i need to extract the table names used in the sql file using a unix script. If i can extract the lines between the keywords 'FROM' and 'WHERE' in the file, my job is done. can somebody tell me how to do this using a shell script. If u can just let me know, how to extract the lines between 2 strings, it would be a great help.
Thanks in advance.

sed -n "/FROM/,/WHERE/p" file

Another way :

awk '/FROM/,/WHERE/' file

Jean-Pierre.