I would like to get all of the column names from a MySQL table, loop through each column name and then run a stored procedure using those column names as a variable. Something to the effect of:
colnames = get column names from table
for each colname
if something changed then
do something
else
do something else
It looks like SHOW COLUMNS FROM myTable
will give me the column names, but how would I get the column names into a loop?
I would really like to run all of this in a stored procedure using native SQL. Since I'm still learning the intricacies of MySQL, and this would really help out my project. Thanks for your help.