永发信息网

MySQL脚本语言,大神帮帮我看看哪里错了,不胜感激!!

答案:2  悬赏:40  手机版
解决时间 2021-02-24 00:04
  • 提问者网友:你独家记忆
  • 2021-02-23 18:39
查询:CREATE DEFINER=`root`@`%` PROCEDURE `pro_iptoaddress`(IN ipvalue double(53,0),OUT ipaddress varchar(100) CHARACTER SET gbk)
BEGIN
SELECt address INTO ipaddress FROM ip WHERe ipvalue BETWEEN startip AND endip LIMIT 1;
END;
错误代码: 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 '' at line 3
最佳答案
  • 五星知识达人网友:时间的尘埃
  • 2021-02-23 19:35
应该是mysql结束符的问题,用下面这个试试
delimiter $$
CREATE DEFINER=`root`@`%` PROCEDURE `pro_iptoaddress`(IN ipvalue double(53,0),OUT ipaddress varchar(100) CHARACTER SET gbk)
BEGIN
SELECt address INTO ipaddress FROM ip WHERe ipvalue BETWEEN startip AND endip LIMIT 1;
END$$
delimiter;
全部回答
  • 1楼网友:神的生死簿
  • 2021-02-23 20:47
你是要导入这个文件吗? 直接打source d:\mydata.sql
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯