This (from body of a stored proc) is throwing a syntax error:
IF (name = in_name)
SET out_id = temp;
ELSE
LOCK TABLE People WRITE;
INSERT INTO People (Name)
VALUES (in_name);
UNLOCK TABLE;
SELECT LAST_INSERT_ID() INTO out_id
END IF
do I have to lock any tables I need at the start of the SP?