i want to display details of drivers working in morning shift..
delimiter //
create function dShift(n int)
returns varchar(128)
deterministic
begin
return (select driver.driver_no,driver_name,licence_no,address,d_age,salary
from driver,bus_driver as bd where bd.shift=n and bd.driver_no =
driver.driver_no);
end //
In your function the return type is varchar
returns varchar(128). So it expects a single string as output. But you are returning 6 columns as output.You can use the following way to get the list of columns as output: