开发者

Stored Functions: How to add multiple varchar together?

开发者 https://www.devze.com 2023-03-28 08:40 出处:网络
I try to get two varchar into one with a mysql Stored Functions? Like with php ($ var1. $ var2) or javascript´s (var1 + var2)

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

精彩评论

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