ZKX's LAB

求PLSQL得一条语句 plsql 求余数

2020-10-08知识5

求几条PL/SQL语句,在线等 EXECUTE IMMEDIATE 'insert into score03 values(''C1'',''S1'',''60'')';EXECUTE IMMEDIATE 'insert into score03 values(''C2'',''S2'',''66'')';EXECUTE IMMEDIATE 'insert into score03 values(''C3'',''S3'',''70'')';EXECUTE IMMEDIATE 'insert into score03 values(''C4'',''S4'',''80'')';commit;select b.username,a.success from score3 a,student3 b where a.s_id=b.id and b.username='张三' order by a.success;

oracle中计算如何取余 取余是用函数mod(numer1,number2)例如select mod(3,2)from dual;返回3除以2的余数 1

关于PL/SQL的问题,求大神帮忙 第一个:selectcase when B is not nullthen to_char(B)else ' ' end|case when C is not nullthen to_char(C)else ' ' end|case when D is not nullthen to_char(D)else ' ' end Afrom TABLENAME第二个,没怎么理解student1表中取出所有grade数据,student2表中取出maxgarde数据,两个表通过ID结合后,再select出结合后的grade与CLASS表通过classID结合。这个maxgarde是说的最大值吗?给点数据看看

PL/SQL 求函数编写 CREATE OR REPLACE FUNCTION F_TAX(P_EMPNO IN EMP.EMPNO%TYPE)RETURN NUMBER ASV_SAL EMP.SAL%TYPE;V_RETURN NUMBER(4,2);V_GRADE SALGRADE.GRADE%TYPE;BEGINV_SAL:=0;SELECT SAL INTO V_SAL FROM EMP WHERE EMPNO=P_EMPNO;SELECT GRADE INTO V_GRADE FROM SALGRADE WHERE V_SAL BETWEEN LOSAL AND HISAL;CASE V_GRADEWHEN 1 THEN V_RETURN:=0;WHEN 2 THEN V_RETURN:=V_SAL*0.05;WHEN 3 THEN V_RETURN:=V_SAL*0.1;WHEN 4 THEN V_RETURN:=V_SAL*0.15;ELSE V_RETURN:=0;END CASE;RETURN V_RETURN;EXCEPTIONWHEN OTHERS THENV_RETURN:=-1;RETURN V_RETURN;END F_TAX;

PL/SQL语句 INSERT INTO DEPARTMENTS VALUES('2','人力资源部',NULL);如果第一个“2”的位置是主键的话,你执行后会报错还有在oracle中,insert into后,要commit;否则相当于没更新

#select#developer

随机阅读

qrcode
访问手机版