The EMPLOYEE tables has these columns:LAST_NAME VARCHAR2(35)SALARY NUMBER(8,2)COMMISSION_PCT NUMBER(5,2)You want to display the name and annual salary multiplied by the commission_pct for all employees. For records that have a NULL commission_pct, a zero must be displayed against the calculated column.Which SQL statement displays the desired results? ()
A. SELECT last_name, (salary * 12) * commission_pct FROM EMPLOYEES;
B. SELECT last_name, (salary * 12) * IFNULL(commission_pct, 0) FROM EMPLOYEES;
C. SELECT last_name, (salary * 12) * NVL2(commission_pct, 0) FROM EMPLOYEES;
D. SELECT last_name, (salary * 12) * NVL(commission_pct, 0) FROM EMPLOYEES;
第1题:
阅读以下说明C++代码,将应填入(n)处的字句写在对应栏内。
[说明]
本程序实现了雇员信息管理功能,其中封装了雇员信息及其设置、修改、删除操作。已知当输入为“Smith 31 2960.0”时,程序的输出是:
姓名:Smith 年龄:31 工资:2960
姓名:Smith 年龄:31 工资:3500
姓名:Mary 年龄:23 工资:2500
[C++程序]
include <iostream.h>
include <string.h>
class employee{
char *name; //雇员姓名
short age; //年龄
float salary;//工资
public:
employee();
void set_name(char *);
void set_age(short a) {age=a;}
void set_salary(float s) {salary=s;}
(1);
~ employee(){delete[] name;}
};
employee::employee() { name="";
age=0;
salary=0.0;
void employee::set_name(char *n)
{ name=new char[strlen(n)+1];
(2) (name,n);
}
void employee::print()
{ cout<<"姓名":"<<name<<" 年龄:"<<agc<<" 工资:" <<salary<<endl;
}
void main()
{ char *na;
short ag=0;
float sa=0;
(3);
na=new char[10];
cin>>na>>ag>>sa;
emp.set_name(na);
emp.set_age(ag);
emp.set_salary(sa);
emp.print();
(4) (3500.0);
emp.print();
(5);
emp.set_name("Mary");
emp.set_age(23);
emp.set_salary(2500.0);
emp.print();
}
第2题:
Click the Exhibit button to examine the data of the EMPLOYEES table. Evaluate this SQL statement:SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager"FROM employees e JOIN employees m ON (e.mgr_id = m.employee_id)AND e.salary > 4000;What is its output?()
A.A
B.B
C.C
D.D
E.E
第3题:
Click the Exhibit button to examine the data of the EMPLOYEES table.Which statement lists the ID, name, and salary of the employee, and the ID and name of the employee‘s manager, for all the employees who have a manager and earn more than 4000?()
A.SELECT employee_id "Emp_id", emp_name "Employee", salary, employee_id "Mgr_id", emp_name "Manager" FROM employees WHERE salary > 4000;
B.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager" FROM employees e JOIN employees m WHERE e.mgr_id = m.mgr_id AND e.salary > 4000;
C.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.employee_id "Mgr_id", m.emp_name "Manager" FROM employees e JOIN employees m ON (e.mgr_id = m.employee_id) AND e.salary > 4000;
D.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.mgr_id "Mgr_id", m.emp_name "Manager" FROM employees e SELF JOIN employees m WHERE e.mgr_id = m.employee_id AND e.salary > 4000;
E.SELECT e.employee_id "Emp_id", e.emp_name "Employee", e.salary, m.mgr_id "Mgr_id" m.emp_name "Manager" FROM employees e JOIN employees m USING (e.employee_id = m.employee_id) AND e.salary > 4000;
第4题:
回收用户U1,U2和U3在关系employee的salary属性上的UPDATE权限的语句是【 】UPDATE(salary) ON employee FROM Ul,U2,U3。
第5题:
Evaluate this SQL statement:e.employee_id, (.15* e.salary) + (.5 * e.commission_pct)+ (s.sales_amount * (.35 * e.bonus)) AS CALC_VALUEFROM employees e, sales sWHERE e.employee_id = s.emp_id;What will happen if you remove all the parentheses from the calculation?()
A.The value displayed in the CALC_VALUE column will be lower.
B.The value displayed in the CALC_VALUE column will be higher.
C.There will be no difference in the value displayed in the CALC_VALUE column.
D.An error will be reported.