开发者

Stored Functions: How to add multiple varchar together?

I try to get two varchar into one with a mysql Stored Functions?

Like with php ($ var1. $ var2) or javascript´s (var1 + var2)

It does not seem that it works with plus(p_email+p_password).

DELIMITER $$

DROP FUNCTION IF EXISTS `voidcod_eventgroup`.`dummy`$$
CREATE FUNCTION `voidcod_eventgroup`.`dummy` (
     p_email VARCHAR(300),
     p_password VARCHAR(16)
) RETURNS VARCHAR(316)
BEGIN
     /* this only returns p_password NOT p_email*/
     RE开发者_如何转开发TURN p_email+p_password;

END$$
DELIMITER ;

Greeting Voidcode.


You could try to use CONCAT, haven't tried it for this kinda stuff though :)

CONCAT(p_email, p_password);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜