搜题
网友您好,请在下方输入框内输入要搜索的题目:
搜题
题目内容 (请给出正确答案)
提问人:网友hanxiucaoye 发布时间:2022-01-07
[主观题]

EMPLOYEES and DEPARTMENTS data:EMPLOYEESDEMP_NAME DEPT_ID MGR_ID JOB_ID SALARY

EMPLOYEES and DEPARTMENTS data:

EMPLOYEES

DEMP_NAME DEPT_ID MGR_ID JOB_ID SALARY

EMPLOYEE_I

101 Smith 20 120 SA_REP 4000

102 Martin 10 105 CLERK 2500

103 Chris 20 120 IT_ADMIN 4200

104 John 30 108 HR_CLERK 2500

105 Diana 30 108 IT_ADMIN 5000

106 Smith 40 110 AD_ASST 3000

108 Jennifer 30 110 HR_DIR 6500

110 Bob 40 EX_DIR 8000

120 Ravi 20 110 SA_DIR 6500

DEPARTMENTS

DEPARTMENT_ID DEPARTMENT_NAME

10 Admin

20 Education

30 IT

40 Human Resources

On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID managers and refers to the EMPLOYEE_ID.

On the DEPARTMENTS table DEPARTMENT_ID is the primary key.

Evaluate this UPDATE statement.

UPDATE employees

SET mgr_id =

(SELECT mgr_id

FROM employees

WHERE dept_id=

(SELECT department_id

FROM departments

WHERE department_name = ‘Administration‘)),

Salary = (SELECT salary

FROM employees

WHERE emp_name = ‘Smith‘)

WHERE job_id = ‘IT_ADMIN‘;

What happens when the statement is executed?()

简答题官方参考答案 (由简答题聘请的专业题库老师提供的解答)
查看官方参考答案
更多“EMPLOYEES and DEPARTMENTS data:EMPLOYEESDEMP_NAME DEPT_ID MGR_ID JOB_ID SALARY”相关的问题
第1题
Click the Exhibit button and examine the data in the EMPLOYEES and DEPARTMENTS tables.You
want to retrieve all employees, whether or not they have matching departments in the departments table. Which query would you use?()

A.SELECT last_name, department_name FROM employees NATURAL JOIN departments;

B.SELECT last_name, department_name FROM employees JOIN departments ;

C.SELECT last_name, department_name FROM employees e JOIN departments d ON (e.department_id = d.department_id);

D.SELECT last_name, department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);

E.SELECT last_name, department_name FROM employees FULL JOIN departments ON (e.department_id = d.department_id);

F.SELECT last_name, department_name FROM employees e LEFT OUTER JOIN departments d ON (e.department_id = d.department_id);

点击查看答案
第2题
Click the Exhibit button and examine the data in the EMPLOYEES and DEPARTMENTS tables.

You want to retrieve all employees, whether or not they have matching departments in the departments table. Which query would you use?()

A. SELECT last_name, department_name FROM employees NATURAL JOIN departments;

B. SELECT last_name, department_name FROM employees JOIN departments ;

C. SELECT last_name, department_name FROM employees e JOIN departments d ON (e.department_id = d.department_id);

D. SELECT last_name, department_name FROM employees e RIGHT OUTER JOIN departments d ON (e.department_id = d.department_id);

E. SELECT last_name, department_name FROM employees FULL JOIN departments ON (e.department_id = d.department_id);

F . SELECT last_name, department_name FROM employees e LEFT OUTER JOIN departments d ON (e.department_id = d.department_id)

点击查看答案
第3题
Examine the structure of the EMPLOYEES and DEPARTMENTS tables:EMPLOYEESColumn name Data ty
pe RemarksEMPLOYEE_ID NUMBER NOT NULL, Primary KeyEMP_NAME VARCHAR2 (30)JOB_ID VARCHAR2 (20)SALARY NUMBERMGR_ID NUMBER References EMPLOYEE_ID COLUMNDEPARTMENT ID NUMBER Foreign key to DEPARTMENT IDcolumn of the DEPARTMENTS tableDEPARTMENTSColumn name Data type RemarksDEPARTMENT_ID NUMBER NOT NULL, Primary KeyDEPARTMENT_NAME VARCHAR2(30)MGR_ID NUMBER References MGR_ID column of theEMPLOYEES tableEvaluate this SQL statement:SELECT employee_id, e.department_id, department_name,salaryFROM employees e, departments dWHERE e. department_id = d.department_id;Which SQL statement is equivalent to the above SQL statement?()

A. SELECT employee_id, department_id, department_name, salary FROM employees WHERE department_id IN (SELECT department_id FROM departments);

B. SELECT employee_id, department_id, department_name, salary FROM employees NATURAL JOIN departments;

C. SELECT employee_id, d.department_id, department_name, salary FROM employees e JOIN departments d ON e.department _ id = d. department_id;

D. SELECT employee_id, department_id, department_name, Salary FROM employees JOIN departments USING (e.department_id, d.department_id);

点击查看答案
第4题
Click the Exhibit button to examine the structure of the EMPLOYEES, DEPARTMENTS, and LOCAT
IONS tables.Two new departments are added to your company as shown:DEPARTMENT_ID DEPARTMENT_NAME MGR_ID LOCATION_ID9998 Engineering 1239999 Administrative BostonYou need to list the names of employees, the department IDs, the department names, and the cities where the departments are, even if there are no employees in the departments and even if the departments are not yet assigned to a location. You need to join the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables to retrieve this information.Which statement do you execute to retrieve this information?()

A.SELECT e.last_name, d.department_id, d.department_name, l.city FROM departments d RIGHT OUTER JOIN employees e ON d.department_id = e.department_id RIGHT OUTER JOIN locations l ON d.location_id = l.location_id;

B.SELECT e.last_name, d.department_id, d.department_name, l.city FROM departments d FULL OUTER JOIN employees e ON d.department_id = e.department_id FULL OUTER JOIN locations l ON d.location_id = l.location_id;

C.SELECT e.last_name, d.department_id, d.department_name, l.city FROM departments d LEFT OUTER JOIN employees e ON d.department_id = e.department_id LEFT OUTER JOIN locations l ON d.location_id = l.location_id;

D.SELECT last_name, department_id, department_name, city FROM departments d NATURAL JOIN employees e NATURAL JOIN locations l;

点击查看答案
第5题
Examine the structure of the EMPLOYEES and DEPARTMENTS tables:EMPLOYEESEMPLOYEE_ID NUMBERD
EPARTMENT_ID NUMBERMANAGER_ID NUMBERLAST_NAME VARCHAR2(25)DEPARTMENTSDEPARTMENT_ID NUMBERMANAGER_ID NUMBERDEPARTMENT_NAME VARCHAR2(35)LOCATION_ID NUMBERYou want to create a report displaying employee last names, department names, and locations. Which query should you use?()

A.SELECT e.last_name, d. department_name, d.location_id FROM employees e NATURAL JOIN departments D USING department_id ;

B.SELECT last_name, department_name, location_id FROM employees NATURAL JOIN departments WHERE e.department_id =d.department_id;

C.SELECT e.last_name, d.department_name, d.location_id FROM employees e NATURAL JOIN departments d;

D.SELECT e.last_name, d.department_name, d.location_id FROM employees e JOIN departments d USING (department_id );

点击查看答案
第6题
Examine the structure of the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables.EMPLOYEESNOT NUL
L,EMPLOYEE_ID NUMBERPrimary KeyVARCHAR2EMP_NAME(30)VARCHAR2JOB_ID(20)SALARY NUMBERReferencesMGR_ID NUMBEREMPLOYEE_IDcolumnDEPARTMENT_ID NUMBER Foreign key toDEPARTMENT_IDcolumn of theDEPARTMENTStableDEPARTMENTSNOT NULL, PrimaryDEPARTMENT_ID NUMBERKeyVARCHAR2DEPARTMENT_NAME(30)References NGR_IDMGR_ID NUMBERcolumn ofthe EMPLOYEES tableForeign key toLOCATION_ID NUMBERLOCATION_IDcolumn of theLOCATIONS tableLOCATIONSNOT NULL, PrimaryLOCATION_ID NUMBERKeyVARCHAR2CITY|30)Which two SQL statements produce the name, department name, and the city of all the employees who earn more then 10000?()

A. SELECT emp_name, department_name, city FROM employees e JOIN departments d USING (department_id) JOIN locations 1 USING (location_id) WHERE salary > 10000;

B. SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 JOIN ON (e.department_id = d.department id) AND (d.location_id =1.location_id) AND salary > 10000;

C. SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 WHERE salary > 10000;

D. SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 WHERE e.department_id = d.department_id AND d.location_id = 1.location_id AND salary > 10000;

E. SELECT emp_name, department_name, city FROM employees e NATURAL JOIN departments, locations WHERE salary > 10000;

点击查看答案
第7题
Justice Departments decision to fire its eight employees has______.A.caused heated discuss

Justice Departments decision to fire its eight employees has______.

A.caused heated discussion

B.proved to be an avenge to the President

C.made the President angry

D.been the result of the Republican Party"s decision

点击查看答案
第8题
现有如下两个关系模式:Employees(Eid,Name,DeptNO)Departments(DeptNO,DeptName,TotalNumber)Emp

现有如下两个关系模式:

Employees(Eid,Name,DeptNO)

Departments(DeptNO,DeptName,TotalNumber)

Employees关系模式描述了职工编号、姓名和所在部门编号;Departments关系模式描述了

部门编号、名称和职工总人数。

请按SQL Server所采用的’rransact—SQL语法格式编写实现具有如下功能的后触发型触

发器:每当在Employees表中插入一行数据时,相应部门的职工总人数就加1。

点击查看答案
第9题
You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20.Which SQL statement would you use to create the view EMP_VU?()

A. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);

B. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;

C. CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;

D. CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);

E. CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;

点击查看答案
重要提示: 请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案
购买前请仔细阅读《购买须知》
请选择支付方式
微信支付
支付宝支付
点击支付即表示你同意并接受《服务协议》《购买须知》
立即支付
搜题卡使用说明

1. 搜题次数扣减规则:

功能 扣减规则
基础费
(查看答案)
加收费
(AI功能)
文字搜题、查看答案 1/每题 0/每次
语音搜题、查看答案 1/每题 2/每次
单题拍照识别、查看答案 1/每题 2/每次
整页拍照识别、查看答案 1/每题 5/每次

备注:网站、APP、小程序均支持文字搜题、查看答案;语音搜题、单题拍照识别、整页拍照识别仅APP、小程序支持。

2. 使用语音搜索、拍照搜索等AI功能需安装APP(或打开微信小程序)。

3. 搜题卡过期将作废,不支持退款,请在有效期内使用完毕。

请使用微信扫码支付(元)

订单号:

遇到问题请联系在线客服

请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示:请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

- 微信扫码关注简答题 -
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
- 微信扫码关注简答题 -
请用微信扫码测试
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

简答题
下载APP
关注公众号
TOP