关于字符串的in中使用
v_str varchar2(32767);
v_num number;
begin
v_str := '''124''';
v_str := v_str || ',';
v_str := v_str || '''B737-700''';
select count(*) into v_num from item where itemnum in (v_str);
dbms_output.put_line(v_str|| ' ' ||v_num);
end;
输出结果:'124','B737-700' 0
说明v_str为'124','B737-700',而itemnum in (v_str)应该为itemnum in ('124','B737-700')
但是输出结果为空;
select count(*) into v_num from item where itemnum in ('124','B737-700');
这个结果为2
相关推荐
mysql中find_in_set()函数的使用及in()用法详解
主要介绍了mysql中find_in_set()函数的使用以及in()用法详解,需要的朋友可以参考下
reverse-the-string-in-js:如何在Javascript中使用for循环扭转字符串
反向字符串在js 这个简短的程序展示了如何由用户反转给定的字符串。 提到的方法之一是使用.reverse方法,第二种是不使用.reveres方法。
PHP-Find-Date-in-String:使用正则表达式在字符串中查找日期的函数
在字符串中查找日期 使用正则表达式在字符串中查找日期的函数 用法 $string = "This building was cleaned on the 8th of October 2006 after a huge storm." $date = find_date( $string ); // Return: array( 'day' => 08, 'month' => 10, 'year' => 2006 ); 其他例子: 2012年1月1日将返回> 2012年1月1日 30-12-11将返回> 30-12-2011 1985年1月2日返回> 1985年1月2日 10.12.1850将返回> 10-12-1850 5 12 85将返回> 1985/05/12 2012年10月5日将返回> 2012年10月10日 1985年5月5日返回> 1985年5月5日 81年3月
Sql in查询字符串分割工具
工作需要,拼接字符串头晕眼花拼接的,特别是in 查询,后面的参数太多,想在数据执行一些这个sql语句老费劲了,所以写了一个生产in后面参数的字符串小工具
Mybatis plus中使用in查询出错如何解决
主要介绍了Mybatis plus中使用in查询出错的问题及解决方法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下


