How to loop through the results from "show tables"
Posted: 03 Mar 2009 08:42
Hi,
I am in the middle of writing a DOS batch file that will be used to loop through all tables in a database to truncate them. I have never used DOS before and have searched all over the internet but am struggling on how I would loop through the results from the "Show tables" results. I have read that DOS does not support arrays and could only loop through a list.
Can anyone help with how I would exactly do this?
Many thanks in advance
I am in the middle of writing a DOS batch file that will be used to loop through all tables in a database to truncate them. I have never used DOS before and have searched all over the internet but am struggling on how I would loop through the results from the "Show tables" results. I have read that DOS does not support arrays and could only loop through a list.
Can anyone help with how I would exactly do this?
Many thanks in advance