Running MySql on an HP ML350 G5 server. Operating system is Small Business Server 2008 .
I have written some SQL server stored programs. I am not an expert.
I have now switched to using MySql.
What I want to do is quite simple. I am not sure what MySql calls a stored program.
I want to write a routine which will read a row from a table.
I want to put the fields into variables.
Then I will calculate the values I want and write them to another table.
I know how to write an INSERT and UPDATE sql statements.
I need to know how to declare variables in a Mysql type of stored program.
May be someone could share some code showing how they declared variables, then created an INSERT statement
with the variables in the INSERT statement?