#如果存在jyf_test存储过程则删掉 DROP PROCEDURE IF EXISTS jyf_test; DELIMITER // #创建存储过程 CREATE PROCEDURE jyf_test() BEGIN #定义数据 SET @a = '1a,2a,3a'; #获取数组长度 SET @num = LENGTH(@a) - LENGTH(REPLACE(@a,; SET @i = ; #循环取数组内容 WHILE(@i <= @num) DO SET @temp = SUBSTRI…
<pre name="code" class="html">SQL> alter session set statistics_level=all; Session altered. SQL> select e.ename,e.job,d.dname from emp e,dept d where e.deptno=d.deptno and e.sal<2000; -------------------省略输出结果-----------…