试题(ZYP).docVIP

  • 45
  • 0
  • 约 12页
  • 2016-12-02 发布于重庆
  • 举报
试题(ZYP)

编程风格问卷 【问题】 有一些变量,请你命名: 数据类型 中文含义 作用域 你的命名 Int 序列号 全局变量 globalID (类) 用户帐单 (类) UserReckoning String/CString 用户名称 类成员 userName Float 当月收入 类成员 currentMonHarvest Char* 营业员 类成员 business Double 罚款 局部变量 smartMoney 请说明你的命名原则。 Class : 第一个字母大写;如果是复合的单词,每个单词的第一个字母大写! Static Final :变量的名字全部都大写,并且指出完整含义 Class 变量 :如果是一个单词,全部小写;如果是复合单词,从第二个单词开始,每 个单词的第一个字母大写! 翻译 将下面的文字翻译为中文: Exceptions are generated by the Java runtime system in response to errors that are detected when classes are loaded and their methods are executed. The runtime system is said to throw these runtime exceptions. Runtime exceptions are objects of the class java.lang.RuntimeException or of its subclasses. 异常的产生是发生在JAVA运行时,当类被载入并且它们的方法被调用,系统响应错误。运行时异常提示抛出这些错误,运行时异常是java.lang.RuntimeException类的对象或其子类对象。 数据库 【问题】 有下列两张表: USERLIST表: TELEPHONE (Varchar(10),主键) ACCOUNT (varchar(10)) RENT (numeric(10,2)) 4210001 AAAA 19.50 4210002 AAAA 20.50 4210003 BBBB 100.00 4210004 CCCC 250.00 CHARGE表: TELEPHONE (Varchar(10),主键) FEE01 (numeric(10,2)) FEE02 (numeric(10,2)) FEE03 (numeric(10,2)) FEE04 (numeric(10,2)) 4210001 11.00 12.00 13.00 14.00 4210002 21.00 22.00 23.00 24.00 4210003 31.00 32.00 33.00 34.00 请用最少的SQL语句,产生下述查询结果: ACCOUNT (Varchar(10),主键) USERS (int) RENT (numeric(10,2)) FEE01 (numeric(10,2)) FEE02 (numeric(10,2)) FEE03 (numeric(10,2)) FEE04 (numeric(10,2)) AAAA 2 40.00 32.00 34.00 36.00 38.00 BBBB 1 100.00 31.00 32.00 33.00 34.00 CCCC 1 250.00 0.00 0.00 0.00 0.00 其中: 数据是经过USERLIST、CHARGE表进行合适的连接后以ACCOUNT为关键字分组求和得到。 【特别注意】:电话号码4210004 在USERLIST表中有一条记录,但是在CHARGE表中并没有记录。但结果中合同号CCCC具有一条记录。 请写出SQL语句。 Select account,count(account) as users,sum(rent) as rent, sum (nvl(fee01,0)) as fee01,sum(nvl(fee02,0)) as feel02, sum (nvl(fee03,0)) as fee03,sum(nvl(fee04,0)) as feel04 from userlist a,charge b where a.telephone=b.telephone(+) group by account; 【问题】 表A 字段代码 字段类型 USER_NO NUMBER NAME VARCHAR2(128) 表B 字段代码 字

文档评论(0)

1亿VIP精品文档

相关文档