Mysql Error in query statements
- by Mark Estrada
Hi All,
I am trying to acquaint myself on Mysql syntax. I only have used MSSQL so far. I downloaded the Mysql Query Browser and have installed the Mysql Version 5.1
I wanted to run this line of code in the resultset tab of mysql but I keep on encountering below error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'declare iCtr int' at line 1
declare iCtr int;
set iCtr = 1;
while iCtr < 1000
begin
insert into employee (emp_id,emp_first_name,emp_last_name,status_id)
values (iCtr, 'firstName' + iCtr, 'lastName' + iCtr, 1)
set iCtr = iCtr + 1;
end
I just wanted to populate my employees table but I cannot get past the mysql syntax. Any advise please. Thanks