xiaodanhuang
xiaodanhuang
2015-08-02 11:09
采纳率: 100%
浏览 3.2k

mysql 存储过程运行成功,但是call procedure 的时候却报错

BEGIN
DECLARE i INT;
SET i = 18672700000;

WHILE i < num DO
INSERT INTO userinfo (
Uid,
Utype,
Tmac,
ACname,
SSID,
UTip,
UTtype,
ULtime,
UOtime,
POname,
Portal,
Appid
)
VALUES
(
i,
'普通用户',
'0C-37-DC-804',
'0020000000',
'wanglangwifi',
'192.168.0.1',
'IPHONE6',
FROM_UNIXTIME(UNIX_TIMESTAMP('20100101000000') + ROUND(RAND() * (UNIX_TIMESTAMP() - UNIX_TIMESTAMP('20100101000000')))),
FLOOR(RAND() * 100 + 1),
'默认组织机构',
'10.0.13.2',
FLOOR(RAND() * 757 + 1)
);
SET i = i + 1;
END WHILE;
END

call procedure wanglang5(18672796110);显示如下错误
[SQL]CALL PROCEDURE wanglang5(18672796110)

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PROCEDURE wanglang5(18672796110)' at line 1

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

2条回答 默认 最新

  • xiaodanhuang
    xiaodanhuang 2015-08-02 12:02
    已采纳

    已解决,是插入数据的格式有问题

    点赞 评论
  • xiaodanhuang
    xiaodanhuang 2015-08-02 11:30

    DECLARE i BIGINT 也没有成功,对应的数据表里面改过来也没用。第一次写存储过程,请指点一下,谢谢

    点赞 评论

相关推荐