两种批量插入方式 方法一 执行以下语句->复制需要插入的数据->点击编辑数据(开锁)->移动鼠标位置使其图标变为向右–按住鼠标左键拉动->粘贴
1 select * from 表 for update
方法二
练习 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 create table t(tno varchar2(20 ))insert into t values ('1,2,3' )select * from tselect substr(tno,1 ,1 )+ substr(tno,3 ,1 )+ substr(tno,5 ,1 ) from tcreate table shuiguo(tdate varchar2(30 ),tname varchar2(20 ),saleamount number(10 ))select * from shuiguoselect * from shuiguo order by case tname when '梨' then 1 when '葡萄' then 2 when '西瓜' then 3 when '橘子' then 4 when '柠檬' then 5 when '苹果' then 6 when '香蕉' then 7 else 8 end , saleamount desc create table emp2(empno number(10 ), ename varchar2(20 ), dname varchar2(20 ), sal number(10 ), e_date date )select * from emp2with tmp as ( select dname 部门名称, ename 员工姓名, count (* ) 连续增长月份 from ( select tmp1.* ,lag (row_num,1 ,row_num-1 )over (partition by ename order by ename,e_date,e_date) last_row_num from ( select emp2.* , lag (sal,1 ,null )over (partition by ename order by ename,e_date) last_sal, row_number ()over (partition by ename order by ename) row_num from emp2 ) tmp1 where sal- last_sal> 0 ) where row_num- last_row_num= 1 group by dname,ename ) select * from tmp where 连续增长月份>= 3