PL/SQL语句: select(case when group_id=1 then cast(department_id as varchar2)else '' end)department_id,(case when group_id=1 then department_name else '' end)department_name,(case when group_id=1 then cast((select avg(salary)from 表名 where department_id=t1.department_id)as varchar2)else '' end)avg_sal,last_name,salaryfrom(select a.*,rank()over(partition by department_id order by salary)group_id from 表名 a)t1
求PL/SQL得一条语句 cast([date]+[time]as datetime)补充:cast(convert(varchar,[date],23)+' '+[time]as datetime)
PL/SQL语句 INSERT INTO DEPARTMENTS VALUES('2','人力资源部',NULL);如果第一个“2”的位置是主键的话,你执行后会报错还有在oracle中,insert into后,要commit;否则相当于没更新