I have been fooling around with Functions and Stored Procedures trying to get a feel for them (PL/SQL was pretty easy, so I figured this couldn't be very hard). Any ideas on what's wrong with this (the documentation is slightly lacking):
delimiter $
CREATE FUCNTION isemployee(first VARCHAR(16), last VARCHAR(16)) RETURNS TINYINT
DECLARE CT TINYINT;
SELECT COUNT(EmployeeId)
INTO CT
FROM Employee WHERE
FName = First AND LName = Last;
RETURN CT;
$
ERROR 1064 (42000): 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 'FUCNTION isemployee(first VARCHAR(16), last VARCHAR(16)) RETURNS TINYINT
DECLARE' at line 1