MySQL create function syntax:
DELIMITER //
CREATE FUNCTION GETFULLNAME(fname CHAR(250),lname CHAR(250))
RETURNS CHAR(250)
BEGIN
DECLARE fullname CHAR(250);
SET fullname=CONCAT(fname,' ',lname);
RETURN fullname;
END //
DELIMITER ;
Use This Function In Your Query
SELECT a.*,GETFULLNAME(a.fname,a.lname) FROM namedbtbl as a
SELECT GETFULLNAME("Biswarup","Adhikari") as myname;
Watch this Video how to create mysql function and how to use in your query