wanglijian8583171
wanglijian8583171
采纳率0%
2017-06-14 07:41 阅读 795

msql 存储过程,各位大神帮忙找一下错误!!!!!在线等,急急急!!!

代码如下:
BEGIN
#Routine body goes here...
DECLARE n TINYINT DEFAULT 1;
DECLARE m TINYINT DEFAULT 1;
set n = 1000;
set m = 6763
while (n <= 2000) do
set n = n + 1;
WHILE (m <= 6901) DO
insert into trajectory_2017_06_10(appuser_id) values(n,select start_date from trajectory_2017_06_09 where id=m,
select end_date from trajectory_2017_06_09 where id=m,
select trajectory_gps from trajectory_2017_06_09 where id=m);
set m = m + 1;
END WHILE;
SET b = 1;

end while;

END!错误截图如下:(https://img-ask.csdn.net/upload/201706/14/1497426017_183953.png)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • strutce 丵鹰 2017-06-14 07:57

    insert into trajectory_2017_06_10(appuser_id) values(n,select start_date from trajectory_2017_06_09 where id=m,
    select end_date from trajectory_2017_06_09 where id=m,
    select trajectory_gps from trajectory_2017_06_09 where id=m); 这里你就设置了一个字段trajectory_2017_06_10(appuser_id),但你却设置了多个值

    点赞 1 评论 复制链接分享

相关推荐