Error Code: 1630. FUNCTION rand.string does not exist

1、错误描述

13:50:13	call new_procedure	Error Code: 1630. FUNCTION rand.string does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual	0.046 sec

2、错误原因

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_procedure`()
BEGIN
  set @a=101;
  while @a<2000 do
  set @b = rand.string(10);
  set @c=1;
  insert into example1 values(@a,@b,@c);
  set @[email protected]+1;
  if(@a%2=0)
     then
     set @c=0;
     end if;
  end while;
END

在给@b赋值时,用的是@b = rand.string(10),其实是想写个随机字符串存储过程

3、解决办法

CREATE DEFINER=`root`@`localhost` PROCEDURE `new_procedure`()
BEGIN
  set @a=101;
  while @a<2000 do
  set @b = rand_string(10);
  set @c=1;
  insert into example1 values(@a,@b,@c);
  set @[email protected]+1;
  if(@a%2=0)
     then
     set @c=0;
     end if;
  end while;
END
时间: 2024-08-26 09:06:20

Error Code: 1630. FUNCTION rand.string does not exist的相关文章

Error Code: 1305. FUNCTION student.rand_string does not exist

1.错误描述 13:52:42 call new_procedure Error Code: 1305. FUNCTION student.rand_string does not exist 0.000 sec 2.错误原因 CREATE DEFINER=`root`@`localhost` PROCEDURE `new_procedure`() BEGIN set @a=101; while @a<2000 do set @b = rand_string(10); set @c=1; ins

Service Broker needs to access the master key in the database ‘BRM_TEST’. Error code:32. The master key has to exist and the service master key encryption is required.

Service Broker needs to access the master key in the database ‘BRM_TEST’. Error code:32. The master key has to exist and the service master key encryption is required. 日志错误:Service Broker needs to access the master key in the database 'BRM_TEST'. Err

Error Code: 1366 - Incorrect string value: &#39;***&#39; for *** row 1

今天处理一个报障问题,执行mysql更新脚本时报错: Error Code: 1366 - Incorrect string value: '\xB3\xAC\xCA\xD0\xBB\xDD...' for column 'ChangecdtionName' at row 1 反复分析,查找网络上相似错误的解决办法,找不到好的方法. 知道这是编码问题,报的错误:1.查看了mysql数据库的编码为utf-8 2.查看了centos系统的编码为:LANG=zh_CN.UTF-8 这奇怪了,都是utf

Error Code: 1418. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled...

Error Code: 1418. This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable) 解决方法: 解决办法也有两种, 第一种是在创建子程序(存储过程.函数.

socket error code

Error Codes The ERRNO values below are set when API calls fail. Use xn_getlasterror to retrieve the error code after an API call fails. Functionxn_geterror_string) can be used to retrieve the string name of a particular error code. All errno values a

Win32 error code message

http://fit.c2.com/fit/files/LispPlatform/lisp/clisp-2.28/src/errwin32.d # Calls a function, passing it information about a Win32 error code. # get_OS_error_info(errcode,func); # > errcode: error code # > func: will be called with name and msg (if av

[HP SIM] Systems Insight Manager stopped working, sqlserver error code 0x80090302。

What is HP SIM first? A: SIM in the artical means Systems Insight Manager, from Hewlett-Packard, for central management of HP servers. One of function for SIM is monitoring, SIM will auto-discover HP servers in your network, when server go down or en

nRF51822 主从断开连接Reason,HCI ERROR CODE :0x003E

最近在给一个客户调主从一体的模块,基于S130,距离稍微远一点就会出现连接上后立马又断开连接的现象, 追踪了一下原因,给出的 HCI Error code 是 0x003E,暂且不知道这是什么鬼,查了网上的一个帖子,解释如下: 断开原因0x3e HCI_ERROR_CODE_CONN_FAILED_TO_ESTABLISH 我用TI CC2640做主机,手机做从机进行数据传输,有时候发现TI作为主机连接上手机后,立刻就会有断开事件,经过跟踪,发现断开原因是 0x3e HCI_ERROR_CODE

Data Flow -&gt;&gt; Excel Connection遇到错误:[Excel Source [16]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.....

在SSIS下做Excel导入数据的时候遇到下面的错误 [Excel Source [16]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Connection Manager" failed with error code 0xC0209303. T