[上机考试技巧]不要使用快捷键! 很多人在使用TC的时候习惯于用F9,CTRL+F9或者其他的热键,首先F9只是编译了,并没有运行程序,考试一定要运行一下你的程序才会有输出文件,否则一定是0分。热键在考...+阅读
Oracle上机考试第五套题
CREATETABLES(snovarchar2(32)NOTNULLUNIQUE,snamevarchar2(64)UNIQUE,statusCHAR
(1),cityvarchar2(128))CREATETABLEP(pnovarchar2(32)NOTNULLUNIQUE,pnamevarchar2(64)UNIQUE,colorvarchar2(32),weightvarchar2(32),cityvarchar2(128))CREATETABLES_P(snovarchar2(32)NOTNULL,pnovarchar2(64)NOTNULL)三。。
(1)SELECTSALFROMEMPORDERBYSALDESC;
(2)SELECTDNAMEFROMDEPTORDERBYDEPTNO;
(3)SELECT((SAL+COMM)*12)AS年收入FROMEMPORDERBY年收入DESCENAME;
谁能帮我做一下这个机试试题
create table student( stuID NUMBER
(10) primary key,stuName VARCHAR2(20) not null,password VARCHAR2(20),major VARCHAR2(50),email VARCHAR2(30) unique,gender char
(1) default '0',birthday date); create table book( bid number
(10) primary key,title varchar2(20),author varchar2(20),price number(6,2)); create table borrow( borrowid number
(10) primary key,stuid number
(10),id number
(10),t_time date default sysdate,b_time date); alter table student add constraint ch_passwd check (password>6); alter table student add constraint ch_gender check (gender in ('0','1')); alter table borrow add constraint fk_borrow_student foreign key (stuid) references student(stuID); alter table borrow add constraint fk_borrow_book foreign key (id) references book(bid); alter table borrow add constraint ch_borrow check (b_time 1. insert into student values(1,'jack','1234567','computer','yyyy3322163.com','0',to_date('19950505','yyyymmdd')); insert into book values(1,'oracle','thomas kyte',200);2. select t.stuid,t.stuname,(case when t.gender = 0 then '男' else '女' end) from student t,borrow t1 where t.stuid = t1.stuid and to_char(t1.t_time,'yyyy-mm-dd') between '2012-12-15' and '2013-1-8';3. select max(count(t.stuid)) from borrow t group by t.stuid;4. select t.stuname,t2.title,t1.t_time,t1.b_time from student t, borrow t1,book t2 where t.stuid = t1.stuid and t1.id = t2.bid and t2.author = '安意如';5. select t.* from student t where t.stuid not in (select t1.stuid from borrow t1 group by t1.stuid);6. create or replace package login is PROCEDURE login_student (student_id in NUMBER, passwd in varchar2, return_flag out varchar2); end; create or replace package body login is PROCEDURE login_student(student_id in NUMBER, passwd in varchar2, return_flag out varchar2) as student_num1 number
(2) := 0; student_num2 number
(2) := 0; begin select count
(1) into student_num1 from student t where t.stuid = student_id; if student_num1 = 1 then select count
(1) into student_num2 from student t where t.stuid = student_id and t.password = passwd; if student_num2 = 1 then select t.stuname into return_flag from student t where t.stuid = student_id and t.password = passwd; else return_flag := '0'; end if; else return_flag := '-1'; end if; end; end login; begin login.login_student(student_id =>:student_id, passwd =>:passwd, return_flag =>:return_flag); end; 这里是测试语句, :student_id :passwd 是你要输入的值 基础数据表7.CREATE OR REPLACE FUNCTION del_book (BOOKID NUMBER) RETURN NUMBER IS PRAGMA AUTONOMOUS_TRANSACTION; BEGIN delete from borrow t where t.id = BOOKID; COMMIT; delete from book t1 where t1.bid = BOOKID; commit; END;
ORACLE期末考试机试试卷求解
--一create table class(class_no char(4) primary key, class_name char(10), class_dept char(10));create table student(stu_no char(6) primary key, stu_name char(8), stu_sex char(2), stu_birth date, stu_score int, stu_escore int, class_no char(4) references class(class_no));--二--1insert into class values('0101','软件01班','软件工程系');insert into class values('0201','软件02班','软件工程系');insert into student values('010201','赵明','男',to_date('1985-12-1','yyyy-mm-dd'),550,50,'0101');insert into student values('010202','赵以','女',to_date('1984-1-11','yyyy-mm-dd'),530,40,'0101');insert into student values('010203','马力','男',to_date('1985-5-24','yyyy-mm-dd'),560,20,'0201');insert into student values('010204','王蕾','女',to_date('1986-2-6','yyyy-mm-dd'),590,10,'0201');insert into student values('010205','马明','女',to_date('1985-4-17','yyyy-mm-dd'),520,30,'0201');--2、查询学生表中所有学生的全部信息。
select * from student--3、查询student表中入学总分在520和550之间的学生的学号、姓名、入学总分信息。select stu_no,stu_name,stu_score+stu_escore 入学总分 from student where stu_score+stu_escore between 520 and 550--4、查询student表中班级编码为“0101”和“0201”的学生的学号、姓名、入学总分信息。select stu_no,stu_name,stu_score+stu_escore 入学总分 from student where class_no in('0101','0201')--5、查询入学总分大于550的学生的学号、姓名、总分和班级名称等信息。select stu_no,stu_name,stu_score+stu_escore 入学总分,class_name from student join class on student.class_no=class.class_no where stu_score+stu_escore>550--6、将student表中马力的学生编号改为“010206”,班级编号改为“0102”。update student set stu_no='010206',class_no='0102' where stu_name='马力'--7、将student表中王蕾的班级编号改为马力的班级编号。
update student set class_no=(select class_no from student where stu_name='马力') where stu_name='王蕾'--8、将student表中王蕾的记录删除。delete from student where stu_name='王蕾'
延伸阅读:
掌握上机考试技巧银行笔试:掌握上机考试技巧 掌握好上机考试的应试技巧,可以使考生的实际水平在考试时得到充分发挥,从而取得较为理想的成绩。历次考试均有考生因为忽略了这一点,加之较为紧张的...
2014年职称英语考试卫生类模拟套题下面共有15个句子,每个句子中均有1个词或短语划有底横线,请从每个句子后面所给的4个选项中选择1个与划线部分意义最相近的词或短语。 1.We are sure that he will get over hi...
程序员考试有上机题吗程序员考试没有上机题的! 程序员考试分为上、下午两场,各75分,均为笔答内容。一般如果上、下午考试都能达到45分以上基本就能通过了。其中上午试题以选择形式给出,每题目一分。...
20082009年第二学期算法与程序设计上机考试题目题2:public static void main(String[] args) { for (int i = 1; i double a = 0.01; double b = 0.02; double c = 0.05; int count = 0; for (int i = 0; i System.out.pr...
Oracle数据库面试题学校的考试求答案求思路1. select decode(性别字段,'A','男','B','女','未知') as 性别 from 表名 (通过decode函数得到想要的值) 2. select 购物人 from 购物信息 having count(购物人||商品名称)>1 (count求...
银行从业资格考试上机技巧有哪些1。熟悉考试场地及环境,尤其要熟悉考场的硬件情况和所使用的相关软件的情况。 对考场的情况应充分熟悉,以免临场影响情绪(个别考生甚至出现手足无措的情况)。例如,考场使用的计算...
报关员考试是上机考还是笔试考报关员考试方式与应试规则: 考试全部采用客观性试题,以闭卷笔试方式进行。考试试卷和答题卡均以简体中文字印刷。考试时限为180分钟,不分场次(考试具体起讫时间将标示在准考证副...
oracle数据库考试简答题请回答一下吧三个都回答了才会给分哦EF CURSOR游标. 3、Open the database.oracle打开数据文件和日志文件之后. 命令为 startup,想要脏读都没可能。 - Oracle 支持 SQL92 标准中的“读取已提交数据(read committe...
计算机考试上机评分问题计算机考试上机评分问题:这个说不清楚啊,给你查了点资料,你看看吧 一、首先要明确的概念: 1、等级考试上机考试成绩不是由人工评改的,是由设计好的评分程序进行评分。 2、目前,计...