网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

The EMP table contains these columns:LAST NAME VARCHAR2(25)SALARY NUMBER(6,2)DEPARTMENT_ID NUMBER(6)You need to display the employees who have not been assigned to any department. You write the SELECT statement:SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMPWHERE DEPARMENT_ID = NULL;What is true about this SQL statement? ()

A. The SQL statement displays the desired results.

B. The column in the WHERE clause should be changed to display the desired results.

C. The operator in the WHERE clause should be changed to display the desired results.

D. The WHERE clause should be changed to use an outer join to display the desired results.


参考答案

更多 “ The EMP table contains these columns:LAST NAME VARCHAR2(25)SALARY NUMBER(6,2)DEPARTMENT_ID NUMBER(6)You need to display the employees who have not been assigned to any department. You write the SELECT statement:SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMPWHERE DEPARMENT_ID = NULL;What is true about this SQL statement? ()A. The SQL statement displays the desired results.B. The column in the WHERE clause should be changed to display the desired results.C. The operator in the WHERE clause should be changed to display the desired results.D. The WHERE clause should be changed to use an outer join to display the desired results. ” 相关考题
考题 客户需要计算EMP表中所有职工12*salary* commission_pct的值.EMP表结构如下:LAST NAME VARCNAR2(35)NOT NULL SALARY NUMBER(9,2)NOT NULL COMMISION_PCTNUMBER(4,2)哪个语句可以查询计算EMP表中所有职工行?() A.SELECT last_name,12*salary* commission_pct FROM empB.SELECT last_name,12*salary*(commission_pct,0)FROM empC.SELECT last_name,12*salary*(nvl(commission_pct,0))FROM emp如果oracle第一个参数为空那么显示第二个参数的值,如果第一个参数的值不为空,则显示第一个参数本来的值D.SELECT last_name,12*salary*(decode(commission_pct,0))FROM emp

考题 UserSCOTTwantstoperformabulkinsertoperationintheEMP_DEPtable.SCOTTreceivesthefollowingerroraftertheINSERTstatementisissuedandfewrowsareinserted:INSERTINTOEMP_DEP(emp_id,name,salary,dep_name,mgr_id)*ERRORatline1:ORA-01653:unabletoextendtableSCOTT.EMP_DEPby128intablespaceUSERSIdentifytwoactionseitherofwhichwillhelpyouresolvethisproblem.()A.GranttheRESOURCEroletoSCOTT.B.AdddatafilestotheUSERStablespace.C.GranttheCREATEANYTABLEprivilegetoSCOTT.D.IncreasethespaceforSCOTTontheUSERStablespace.E.IncreasethesizeofthedatafileassociatedwiththeUSERStablespace

考题 Evaluate this SQL statement:SELECT e.emp_name, d.dept_nameFROM employees eJOIN departments dUSING (department_id)WHERE d.department_id NOT IN (10,40)ORSER BY dept_name;The statement fails when executed. Which change fixes the error? ()A. remove the ORDER BY clauseB. remove the table alias prefix from the WHERE clauseC. remove the table alias from the SELECT clauseD. prefix the column in the USING clause with the table aliasE. prefix the column in the ORDER BY clause with the table aliasF. replace the condition d.department_id NOT IN (10,40) in the WHERE clause with d.department_id 10 AND d.department_id 40

考题 The EMPLOYEES table contains these columns:LAST_NAME VARCHAR2 (25)SALARY NUMBER (6,2)COMMISSION_PCT NUMBER (6)You need to write a query that will produce these results:1. Display the salary multiplied by the commission_pct.2. Exclude employees with a zero commission_pct.3. Display a zero for employees with a null commission value. Evaluate the SQL statement:SELECT LAST_NAME, SALARY*COMMISSION_PCT FROM EMPLOYEESWHERE COMMISSION_PCT IS NOT NULL;What does the statement provide? ()A. All of the desired resultsB. Two of the desired resultsC. One of the desired resultsD. An error statement

考题 Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)DEPARTMENT_ID NUMBERSALARY NUMBERWhat is the correct syntax for an inline view? ()A. SELECT a.last_name, a.salary, a.department_id, b.maxsal FROM employees a, (SELECT department_id, max(salary)maxsal FROM employees GROUP BY department_id) b WHERE a.department_id = b.department_id AND a.salary b.maxsal;B. SELECT a.last name, a.salary, a.department_id FROM employees a WHERE a.department_id IN (SELECT department_id FROM employees b GROUP BY department_id having salary = (SELECT max(salary) from employees))C. SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE a.salary = (SELECT max(salary) FROM employees b WHERE a.department _ id = b.department _ id);D. SELECT a.last_name, a.salary, a.department_id FROM employees a WHERE (a.department_id, a.salary) IN (SELECT department_id, a.salary) IN (SELECT department_id max(salary) FROM employees b GROUP BY department_id ORDER BY department _ id);

考题 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;

考题 阅读以下说明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();}

考题 The EMP table contains these columns:LAST_NAME VARCHAR2 (25)SALARY NUMBER (6,2)DEPARTMENT_ID NUMBER (6)You need to display the employees who have not been assigned to any department. You write the SELECT statement:SELECT LAST_NAME, SALARY, DEPARTMENT_IDFROM EMPWHERE DEPARTMENT_ID = NULL;What is true about this SQL statement ?()A.The SQL statement displays the desired results.B.The column in the WHERE clause should be changed to display the desired results.C.The operator in the WHERE clause should be changed to display the desired results.D.The WHERE clause should be changed to use an outer join to display the desired results.

考题 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;