Oracle学习笔记:基础及PLSQL

Oracle:
1、不等于
	select * from username where name!='god';
	select * from username where name<>'god';
	select * from username where not name='god';
2、查询表结构:
	desc username;
3、多表连接查询:
    无条件连接:
	select emp.empno,emp.ename,emp.depno,dept.dname
	from scott.emp,scott.dept;
        返回笛卡乐积。
    等值查询:
	select emp.empno,emp.ename,emp.depno,dept.dname
	from scott.emp,scott.dept
	where scott.emp.depno=scott.dept.depno;
    非等值查询
	select emp.empno,emp.ename,emp.depno,dept.dname
	from scott.emp,scott.dept
	where scott.emp.depno!=scott.dept.depno and scott.dept.depno='20';
4、嵌套查询:
    简单嵌套查询:
	select emp.empno,emp.ename,emp.job,emp.sal
	from scott.emp
	where sal >=(select sal from scott.emp where ename='ward');
    带in嵌套查询:
	select emp.empno,emp.ename,emp.job,emp.sal
	from scott.emp
	where sal in (select sal from scott.emp where ename='ward');
    带any嵌套查询:
	select emp.empno,emp.ename,emp.job,emp.sal
	from scott.emp
	where sal>any (select sal from scott.emp where ename='manager');
	执行步骤:
	先执行select sal from scott.emp where ename='manager'可能返回多个值:如:1250,1130,2500
	再执行:
	select emp.empno,emp.ename,emp.job,emp.sal
	from scott.emp
	where sal>1250 or sal>1130 or sal>2500;
    带some的嵌套查询:
	select emp.empno,emp.ename,emp.job,emp.sal
	from scott.emp
	where sal=some (select sal from scott.emp where ename='manager');
	执行步骤:
	先执行select sal from scott.emp where ename='manager'可能返回多个值:如:1250,1130,2500
	再执行:
	select emp.empno,emp.ename,emp.job,emp.sal
	from scott.emp
	where sal=1250 or sal=1130 or sal=2500;
    带all的嵌套查询:
	select emp.empno,emp.ename,emp.job,emp.sal
	from scott.emp
	where sal>all (select sal from scott.emp where ename='manager');
	执行步骤:
	先执行select sal from scott.emp where ename='manager'可能返回多个值:如:1250,1130,2500
	再执行:
	select emp.empno,emp.ename,emp.job,emp.sal
	from scott.emp
	where sal>1250 and sal>1130 and sal>2500;
    带exists的嵌套查询:
	select emp.empno,emp.ename,emp.job,emp.sal
	from scott.emp,scott.dept
	where exists
	(select * from scott.emp where scott.emp.deptno=scott.dept.deptno);
    集合并操作:
	(select deptno from scott.emp)
	union
	(select deptno from scott.dept);
    交集合操作:
	(select deptno from scott.emp)
	intersect
	(select deptno from scott.dept);
    差集合操作:即属于集合A且不属于集合B的元素总和就是差集。
	(select deptno from scott.dept)
	minus
	(select deptno from scott.emp);

5、使用函数查询:
    ceil函数:
	select sal,sal/100,ceil(sal/100) from scott.emp;
	ceil(n)取大于等于数值n的最小整数。如sal/100=78.39,则ceil(sal/100)=79
	注意它并不是四舍五入的。同时注意oracle中sal/100指的不是整除。
    floor函数:
	floor(n)取小于等于数值n的最大整数。
	如:sal/100=17.12 ,则floor(sal/100)=17
    mod(m,n)函数:
	mod(m,n)取m整除n后的余数:如mod(17,3)=2,mod(17/2)=1
    power(m,n)取m的n次方
	power(3,2)=9
    round(m,n)
	四舍五入,保留n位。如:round(1.333,2)=1.33
    sign(n)
	n>0取1,n=0 取0,n<0取-1;
    avg(字段名)
	求平均值,字段为数值型。
    count(*)
	统计总数;
    min(字段名),max(字段名)
	计算数值型字段最小数最大数。
    sum(字段名)计算数值型字段总和。
	
6、表间复制
    注意没有mssql中语句:select * into .. from ...
    用法如下:
    create table system.username1
	 as
	 (
	 select * from system.username
	 );
	 即创建表username1,并将username表中的数据复制到username1表。
7、删除语句:
    delete from 
    truncate from tablename
    这两个语句的区别:
    delete 删除的数据内容会存储在系统回滚段中,需要的时候,数据仍可回滚恢复,但truncate命令删除的数据是不可恢复的。
8、系统默认账户名:                密码:
	system                     manager
	sys                        change_on_install
	scott                      tiger

9、创建表格时使用主键、外键约束

	CREATE TABLE "SCOTT"."STUDENT" ("STUDENT_ID" NUMBER(8) NOT NULL, 
	    "NAME" VARCHAR2(10 byte) NOT NULL, "BIRTHDAY" DATE NOT NULL, 
	    "DIRECTOR_ID" NUMBER(6) NOT NULL, 
	    CONSTRAINT "导师编码外键" FOREIGN KEY("DIRECTOR_ID") 
	    REFERENCES "SCOTT"."DIRECTOR"("DIRECTOR_ID"), 
	    CONSTRAINT "学生编码主键" PRIMARY KEY("STUDENT_ID") 
	    USING INDEX  
	    TABLESPACE "USERS" 
	    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS 
	    2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255)
	     
	    TABLESPACE "USERS" PCTFREE 10 PCTUSED 0 INITRANS 1 MAXTRANS 
	    255 
	    STORAGE ( INITIAL 64K NEXT 0K MINEXTENTS 1 MAXEXTENTS 
	    2147483645 PCTINCREASE 0) 
	    LOGGING 
10、使用truncate table 时,如果不事先将导师表和学生表的外键关系去掉而直接删除导师表将会出错。
	先执行:
	alter table scott.student
	disable constraint "导师编码外键";
	再truncate table scott.Direactor drop storage;
	
11、插入日期数据时注意的地方
	INSERT INTO "SCOTT"."STUDENT" ("STUDENT_ID" ,"NAME" ,"BIRTHDAY" ,"DIRECTOR_ID" ) 
	    VALUES (90002 ,'zhangji' ,TO_DATE('03-11月-1983', 'dd-Mon-yyyy HH:MI:SS AM') ,200202  )
	 注意BIRTHDAY为DATE类型数据,插入时应使用:TO_DATE('03-11月-1983', 'dd-Mon-yyyy HH:MI:SS AM')
12、创建索引
	CREATE UNIQUE INDEX "SCOTT"."学生编码主键" 
	    ON "SCOTT"."STUDENT"  ("STUDENT_ID") 
	    TABLESPACE "USERS" 
13、创建约束条件
	CONSTRAINT "约束" CHECK(STUDENT_ID>9000 AND STUDENT_ID<90005)

14、ORACLE用户管理
	用户名                       口令                                  登录身份说明
	sys                         chang_on_install            sysdba 或 sysoper,但不能以normal身份登录,可做默认系统管理员。
	system                      manager                     sysdba 或 normal,但不能以sysoper身份登录,可做默认系统管理员。
	scott                         tiger                     normal普通用户
	aqadm                         aqadm                     sysdba 或 normal,高级队列管理员
	Dbsnmp                        dbsnmp                    sysdba 或 normal,复制管理员
15、创建用户
	CREATE USER "TEMPUSER"  PROFILE "DEFAULT" 
	    IDENTIFIED BY "sys833199" DEFAULT TABLESPACE "USERS" 
	    ACCOUNT UNLOCK;
	GRANT "CONNECT" TO "TEMPUSER";
16、PL/SQL procedure language 过程化SQL
	如创建表:
	CREATE TABLE "TEMPUSER"."TESTTABLE" ("RECORDNUMBER" NUMBER(4) NOT
	    NULL, "CURRENTDATE" DATE NOT NULL)  
	    TABLESPACE "USERS" 
	在sql plus worksheet中执行以下语句:
	set serveroutput on
	declare
		maxrecords constant int:=100;
		i int:=1;
	begin
		  for i in 1..maxrecords loop
		  insert into tempuser.testtable(recordnumber,currentdate)
		  values(i,sysdate);
		  end loop;
		  dbms_output.put_line('成功录入数据!');
		  commit;
	 end;
	 在表testtable中插入了一百条数据,recordnumber从1到100,currentdate为当前系统日期值。
	
	1、完整的PL SQL结构为:
		declare
			定义语句段
		begin
			执行语句段
		exception
			异常处理语句段
		end

	2、基本语法
	   常量:
		常量名  constant  类型标识符 [not null] :=值;
		如:
			declare
				pi constant number(9):=3.1415926;
			begin
				commit;
			end;
	   变量:
		变量名 类型标识符 [not null]:=值;
			declare
				age number(6):=26;
			begin
				commit;
			end;

	3、PLSQL中的常用的基本类型
		类型标识符                    说明
		Number                    数字型
		Int                       整数型
		Pls_integer               整数型,产生溢出时出现错误
		Char                      定长字符型,最大255个字符
		Varchar2                  变长字符型,最大2000个字符
		Long                      变长字符型,最大2GB
		Date                      日期型
		Boolean                   布尔型(true,false,null三都取一)
		
	4、PL SQL中的复合类型变量
	     4.1、pl sql中的类型与ORACLE中的类型有的含义一样,有的则不同。这样ORACLE引入了%TYPE方法来定义变量
		如:testtable表中字段currentdate为date类型,
		在PL SQL中引入此变量类型,这样当表中字段改变时,在对应的PL SQL 中的变量类型也相应改变了。
		变量名  数据表名。列名%type;
		使变量获得与表中某一列相同的类型。
		declare
			mydate tempuser.testtable.currentdate%type;
		begin
			commit;
		end;
	     4.2、定义记录类型的变量即多个基本数据类型捆绑在一起。
		     如
		     set serveroutput on
		     declare
			type myrecord is record(
				myrecordnumber int,
				mycurrentdate date);
				srecord myrecord;
		     begin
			select * into srecord from tempuser.testtable where recordnumber=21;
			dbms_output.put_line(srecord.mycurrentdate);
			
		     end;
		     以上定义了名为myrecord的记录类型,srecord为记录类型变量。
	     4.3、使用%rowtype定义变量
		变量名  数据表%rowtype
		获得整个记录的数据类型。
		declare 
		    mytable tempuser.testtable%rowtype;
		begin
			select * into mytable from tempuser.testtable where recordnum=32;
			dbms_output.put_line(mytable.currentdate);
		end;
	     4.4、定义一维表类型变量
		type 表类型 is table of 类型 index by binary_integer;
		表变量名 表类型;
		其中类型可以是基本类型也可以是上面1,2,3中定义的类型

		declare
		  type tabletype1 is table of varchar2(4) index by binary_integer;
		  type tabletype2 is table of tempuser.testtable.recordnumber%type index by binary_integer;
		  table1 tabletype1;
		  table2 tabletype2;
		begin
		  table1(1):='大学';
		  table1(2):='大专';
		  table2(1):=88;
		  table2(2):=99;
		  dbms_output.put_line(table1(1)||table2(1));
		  dbms_output.put_line(table1(2)||table2(2));
		  
		end;
		以上定义了两个一维表类型tabletype1,tabletype2,相当两个一维数组,然后定义了两个一维表类型变量table1,table2.
		在执行部分提供了对他们的赋值,最后通过||字符串连接符输出,输出如:大学88        大专99
		
		在表类型变量中可以使用count,delete,first,last,next,exists,prior等属性操作,使用方法为变量名。属性名
		如:
		set serveroutput on
		declare
		  type tabletype1 is table of varchar2(9) index by binary_integer;
		  table1 tabletype1;
		begin
		  table1(1):='北京市';
		  table1(2):='青岛市';
		  table1(3):='上海市';
		  table1(4):='长沙市';
		  table1(5):='南昌市';
		  dbms_output.put_line('总记录数为:'||to_char(table1.count));
		  dbms_output.put_line('第一条记录:'||table1.first);
		  dbms_output.put_line('最后一条记录:'||table1.last);
		  dbms_output.put_line('第一条记录:'||table1.first);
		  dbms_output.put_line('第二条的前一条记录:'||table1.prior(2));
		  dbms_output.put_line('第二条的后一条记录:'||table1.next(2));
		end;

		输出结果为:
		总记录数为:5
		第一条记录:1
		最后一条记录:5
		第一条记录:1
		第二条的前一条记录:1
		第二条的后一条记录:3
	     4.5、定义多维表类型变量
		 set serveroutput on
		 declare
		   type tabletype1 is table of testtable%rowtype index by binary_integer;
		   table1 tabletype1;
		 begin
		   select * into table1(60) 
		   from tempuser.testtable
		   where recordnumber=60;
		   dbms_output.put_line(table1(60).recordnumber||table1(60).currentdate);
		  
		 end;
		 输出:
		 6021-7月 -08
	5、表达式
		字符表达式:||
		    当变量为数值型时,需使用to_char(变更名)转换为字符名再通过dbms_output.put_line输出。
		关系表达式:
		    in 在。。之中
		 常见类型转换函数
		 to_char():将其它类型转换成字符型
		 to_date():将其它类型转换成日期型
		 to_number():将其它类型转换成数值型
	6、流程控制
		条件控制1:
			if 条件 then
				语句段;
			end if;
		条件控制2:
			if 条件 then
				语句段1;
			else
				语句段2;
			end if;
		条件控制3:if嵌套
			if 条件 then
				if 条件 then
					语句段;
				else
					语句段;
				end if;
			else
				语句段;
			end if;
		示例:
		set serveroutput on
		declare
		  num1 Integer:=12;
		  num2 Integer:=23;
		begin
		  if num1>num2 then
		    dbms_output.put_line(' num1>num2');
		  else
		    dbms_output.put_line(' num1<=num2');
		  end if;
		end;
		
		循环控制1:loop...exit..end loop
		loop
			循环语句段;
		        if 条件语句 then
			   exit;
			else
			   退出循环的处理语句段;
			end if;
		end loop;
		示例:
		declare
			num1 Integer:=20;
			num2 Integer:=30;
			i Integer:=0;
		begin
			loop
			    num1:=num1+1;
				if num1=num2 then
				exit;
				else
				i:=i+1;
				end if;
			end loop;
			dbms_output.put_line('共循环次数'||to_char(i));
		end;
		输出结果:9
		循环控制2:loop...exit when..end loop
		declare
			num1 Integer:=20;
			num2 Integer:=30;
			i Integer:=0;
		begin
			loop
			    num1:=num1+1;
			    i:=i+1;
			    exit when num1=num2 
			end loop;
			dbms_output.put_line('共循环次数'||to_char(i));
		end;
		输出结果:10
		可见采用when比if循环要多执行一次。

		循环控制3:when loop..end loop
		循环控制4:for..in..loop ...end loop
		for 循环变量 in 循环下界。。循环上界 loop
			循环处理语句段;
		end loop;
17、事务处理
	在ORACLE中为了保证多个客户机对数据的操作的完整性,设定在内存中为每个客户机创建工作区,他们在工作区中进行的操作必须使用commit命令提交才真正修改数据库中的内容。
	可使用set auto on打开自动提交功能,这样PL SQL执行后将自动完成提交功能。
	rollback命令,在尚未提交commit命令之前,如果发现delete,insert,update等操作需要恢复的话,可使用rollback命令回滚到上一次使用commit时的状态。
	select * from testtable; 
	返回100行;
	delete from testtable;
	删除100行;
	select * from testtable;
	未选定行
	rollback;
	select * from testtable;
	返回100行。

	使用保存点命令:
	创建保存点:savepoint 保存点名;
	回滚保存点:rollback to 保存点名;

18、游标
	MSSQL中定义游标的方法示例:
	DECLARE Employee_Cursor CURSOR FOR
		SELECT LastName, FirstName FROM Northwind.dbo.Employees
		OPEN Employee_Cursor
		FETCH NEXT FROM Employee_Cursor
		WHILE @@FETCH_STATUS = 0
		BEGIN
		   FETCH NEXT FROM Employee_Cursor
		END
		CLOSE Employee_Cursor
		DEALLOCATE Employee_Cursor
	
	在ORACLE中的PL SQL中使用游标
	declare cusor 游标名 is select 语句;
	open 游标名;
	再提取游标数据
	fetch 游标名 into 变量名1,变量名2,。。。;
	或
	fetch 游标名 into 记录型变量名;
	如:
		set serveroutput on
		declare
		  tempsal scott.emp.sal%type;
		  cursor mycursor is 
		    select * from scott.emp where sal>tempsal;
		begin
		  tempsal:=800;
		  open mycursor;
		end;

	完全定义游标以及取数据过程如下:
	set serveroutput on
	declare
	  tempsal scott.emp.sal%type;
	  cursor mycursor is 
	    select * from scott.emp where sal>tempsal;
	  cursorrecord mycursor%rowtype;
	begin
	  tempsal:=800;
	  open mycursor;
	  fetch mycursor into cursorrecord;
	  dbms_output.put_line(to_char(cursorrecord.deptno));
	  close mycursor;
	end;
	其中:cursorrecord mycursor%rowtype;定义cursorrecord为游标mycursor的记录行变量;
	结果为在游标的结果中找到sal字段大于800的第一个记录,显示deptno的内容。
19.游标的属性
	使用方法:游标名。[属性]
	1.%isopen:测试游标是否打开,如果没有打开使用fetch语句将会出错。
	2.%found:测试前一个fetch语句是否有值,如有则返回true,否则为false.
	3.%notfound:
	4.%rowcount:返回游标的数据行数.
		通过dbms_output.put_line(to_char(mycursor%rowcount));若返回值为0表明游标已打开,但没有提取出数据。
20、过程
	过程的语法结构
	create or replace procedure 过程名 as
		声明语法段;
	begin
		执行处理段;
	exception
		异常处理段;
	end;

	注意:as代替了declare所以声明段中不需要declare关键字。
	create or replace procedure tempproc as 
	  tempdate tempuser.testtable.currentdate%type;
	begin
	  select currentdate into tempdate from testtable where recordnumber=22;
	  dbms_output.put_line(to_char(tempdate));
	end;

	执行过程:
	  set serveroutput on
	begin
	  tempproc;
	end;

	带参数的过程:
	in 参数:读入参数,主程序向过程传递参数值;
	out 参数:读出参数,过程向主程序传递参数值;
	in out 参数:双向参数,过程与主程序双向传递数据。
	示例如下:
	create or replace procedure p
	(v_a in number,v_b number,v_ret out number,v_temp in out number)
	as
	begin
	  if(v_a>v_b) then
	      v_ret :=v_a;
	  else
	      v_ret :=v_b;
	  end if;
	  v_temp := v_temp + 1;
	  
	end;

	执行过程:
	set serveroutput on
	declare 
	 a int:=10;
	 b int:=20;
	 c int:=25;
	 d int:=30;
	begin
	  p(a,b,c,d);
	  dbms_output.put_line(to_char(a));
	  dbms_output.put_line(to_char(b));
	  dbms_output.put_line(to_char(c));
	  dbms_output.put_line(to_char(d));
	end;

	输出结果:
	10
	20
	20
	31
21、序列
	即创建和使用自增自减的字段:
	方法:
	CREATE SEQUENCE "SCOTT"."TEMPORDER" INCREMENT BY 1 START WITH 1 
	    MAXVALUE 1.0E28 MINVALUE 1 NOCYCLE 
	    CACHE 20 NOORDER
	在用户点序列,创建或用以上脚本创建序列。
	针对某一个表中的一个字段应用这个序列即可
	创建APPLYORDER表如下:
	CREATE TABLE "SCOTT"."APPLYORDER" ("EMPNO" NUMBER(10) NOT NULL)  
	TABLESPACE "USERS"
	执行插入语句,使empno字段应用序列temporder.
	INSERT INTO "SCOTT"."APPLYORDER"(EMPNO)
	VALUES(SCOTT.TEMPORDER.NEXTVAL);
	INSERT INTO "SCOTT"."APPLYORDER"(EMPNO)
	VALUES(SCOTT.TEMPORDER.NEXTVAL);
	连续插入两个值:
	select * from scott.applyorder;
	输出结果为:
	1
	2
22、异常处理
	1.定义异常处理:declare 异常名 exception ;
	2.触发异常处理:raise 异常名;
	3.处理异常
		Exception
		when 异常名1 then
			异常处理段1;
		when 异常名2 then
			异常处理段2;
	示例:
	set severoutput on
	declare 
		salaryerror exception;
		tempsal scott.emp.sal%type;
	begin
		select sal into tempsal
		from scott.emp
		where empno=7566;
		if tempsal<900 or tempsal>2600 then
		raise salaryerror;
		end if;
		exception 
		when salaryerror then
			dbms_output.put_line('薪水超出范围');
		end;
23、综合练习
	表:GRADUATE
	CREATE TABLE "SCOTT"."GRADUATE" ("BH" NUMBER(10) NOT NULL, "XM" 
	    VARCHAR2(10 byte) NOT NULL, "LB" VARCHAR2(10 byte) NOT NULL, 
	    "YINGYU" NUMBER(4, 1) NOT NULL, "ZHENGZHI" NUMBER(4, 1) NOT 
	    NULL, "ZHUANGYE1" NUMBER(4, 1) NOT NULL, "ZHUANGYE2" NUMBER(4,
	    1) NOT NULL, "ZHUANGYE3" NUMBER(4, 1) NOT NULL)  
	    TABLESPACE "USERS" 
	表:RESULT
	CREATE TABLE "SCOTT"."RESULT" ("BH" NUMBER(10) NOT NULL, "XM" 
	    VARCHAR2(10 byte) NOT NULL, "LB" VARCHAR2(10 byte) NOT NULL, 
	    "YINGYU" NUMBER(4, 1) NOT NULL, "ZHENGZHI" NUMBER(4, 1) NOT 
	    NULL, "ZHUANGYE1" NUMBER(4, 1) NOT NULL, "ZHUANGYE2" NUMBER(4,
	    1) NOT NULL, "ZHUANGYE3" NUMBER(4, 1) NOT NULL, "TOTALSCORE" 
	    NUMBER(5, 1) NOT NULL, "FLAG" VARCHAR2(4 byte) NOT NULL)  
	    TABLESPACE "USERS" 
	过程:graduateprocess
	CREATE OR REPLACE  PROCEDURE "SCOTT"."GRADUATEPROCESS"  (
		  tempzhengzhi in scott.graduate.zhengzhi%type,
		  tempyingyu in scott.graduate.yingyu%type,
		  tempzhuangye1 in scott.graduate.zhuangye1%type,
		  tempzhuangye2 in scott.graduate.zhuangye2%type,
		  tempzhuangye3 in scott.graduate.zhuangye3%type,
		  temptotalscore in scott.result.totalscore%type
		)
		as
		  graduaterecord scott.graduate%rowtype;
		  graduatetotalscore scott.result.totalscore%type;
		  graduateflag varchar2(4);
		  cursor graduatecursor is
		    select * from scott.graduate;
		  errormessage exception;
		begin
		  open graduatecursor;
		  if graduatecursor%notfound then
		    raise errormessage;
		  end if ;
		  loop
		  fetch graduatecursor into graduaterecord;
		  graduatetotalscore:=graduaterecord.yingyu+graduaterecord.zhengzhi+graduaterecord.zhuangye1+graduaterecord.zhuangye2+graduaterecord.zhuangye3;
		  if(graduaterecord.yingyu>=tempyingyu and
		     graduaterecord.zhengzhi>=tempzhengzhi and
		     graduaterecord.zhuangye1>=tempzhuangye1 and
		     graduaterecord.zhuangye2>=tempzhuangye2 and
		     graduaterecord.zhuangye3>=tempzhuangye3 and
		     graduatetotalscore>=temptotalscore
		  )
		    then
		      graduateflag:='录取';
		  else
		      graduateflag:='落选';
		  end if;
		  exit when graduatecursor%notfound;
		  insert into scott.result(BH,XM,LB,ZHENGZHI,YINGYU,ZHUANGYE1,ZHUANGYE2,ZHUANGYE3,totalscore,flag)
		  VALUES(graduaterecord.bh,graduaterecord.xm,graduaterecord.lb,graduaterecord.zhengzhi,graduaterecord.yingyu,graduaterecord.zhuangye1,graduaterecord.zhuangye2,graduaterecord.zhuangye3,graduatetotalscore,graduateflag);
		  end loop;
		  close graduatecursor;
		  commit;
		  exception
		  when errormessage then
		    dbms_output.put_line('无法打开数据表');

		end;
	

	调用主程序执行过程:
	set serveroutput on
	declare 
	  score1 number(4,1);
	    score2 number(4,1);
	      score3 number(4,1);
		score4 number(4,1);
		  score5 number(4,1);
		    scoretotal number(5,1);
	begin
	  score1:=50;
	    score2:=60;
	      score3:=60;
		score4:=55;
		  score5:=60;
		    scoretotal:=350;
	   scott.graduateprocess(score1,score2,score3,score4,score5,scoretotal);
	end;

 

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值