Mysql - 触发器 - Concat - 失败

时间:2012-06-25 14:50:42

标签: mysql string triggers var not-exists

我有这个触发器并产生错误: 该表不存在“lecturas.TablaX”

Begin

# Declaramos Variables
Declare MasterX,TablaX, varchar(100);

#Determinamos Master
Set MasterX =  LPAD(New.Master, 3, 0); 

#Armar Ruta
Set TablaX = Concat ( 'lecturas.M',MasterX);

# Insertar datos en la tabla Lecturas
INSERT INTO TablaX (Id) Values (New.Master);

End

0 个答案:

没有答案