单选题Scott issues the SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCHAR2(14), loc VARCHAR2(13)}; GRANT SELECT ON DEPT T0 SUE; If Sue needs to select from Scott's DEPT table, which command should she use?()A SELECT*FROMDEPT;B SELECT*FROMSCOT

题目
单选题
Scott issues the SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCHAR2(14), loc VARCHAR2(13)}; GRANT SELECT ON DEPT T0 SUE; If Sue needs to select from Scott's DEPT table, which command should she use?()
A

SELECT*FROMDEPT;

B

SELECT*FROMSCOTT.DEPT;

C

SELECT*FROMDBASCOTTDEPT;

D

SELECT*FROMALL_USERSWHEREUSER_NAME=';SCOTT';ANDTABLENAME=';DEPT';;

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Examine the description of the EMPLOYEES table:EMP_ID NUMBER(4) NOT NULLLAST_NAME VARCHAR2(30) NOT NULLFIRST_NAME VARCHAR2(30)DEPT_ID NUMBER(2)JOB_CAT VARCHARD2(30)SALARY NUMBER(8,2)Which statement shows the maximum salary paid in each job category of each department? ()

A. SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary > MAX (salary);

B. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;

C. SELECT dept_id, job_cat, MAX(salary) FROM employees;

D. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;

E. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;


参考答案:B

第2题:

Which of the following statements eliminates all but one of each set of duplicate rows in the DEPT column in the STAFF table?()

A.SELECT UNIQUE dept FROM staff

B.SELECT DISTINCT dept FROM staff

C.SELECT (dept) UNIQUE FROM staff

D.SELECT (dept) DISTINCT FROM staff


参考答案:B

第3题:

The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this? ()

A. GRANT select ON dept TO ALL_ USER;

B. GRANT select ON dept TO ALL;

C. GRANT QUERY ON dept TO ALL_USERS

D. GRANT select ON dept TO PUBLIC;


参考答案:D

第4题:

Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) Which statement produces the number of different departments that have employees with last name Smith?()

  • A、SELECT COUNT(*) FROM employees WHERE last_name='Smith';
  • B、SELECT COUNT(dept_id) FROM employees WHERE last_name='Smith';
  • C、SELECT DISTINCT(COUNT(dept_id)) FROM employees WHERE last_name='Smith';
  • D、SELECT COUNT(DISTINCT dept_id) FROM employees WHERE last_name='Smith';
  • E、SELECT UNIQUE(dept_id) FROM employees WHERE last_name='Smith';

正确答案:D

第5题:

Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only of the minimum salary is less then 5000 and the maximum salary is more than 15000?()

  • A、SELECT dept_id, MIN(salary(, MAX(salary) FROM employees WHERE MIN(salary) <5000 AND MAX (salary) > 15000;
  • B、SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;
  • C、SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) <5000 AND MAX (salary) > 15000;
  • D、SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN (salary) < 5000 AND MAX(salary)
  • E、SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) <5000 AND MAX (salary) > 15000;

正确答案:D

第6题:

Scott issues the SQL statements:CREATE TABLE dept(deptno NUMBER(2),dname VARCHAR2(14),loc VARCHAR2(13)};GRANT SELECTON DEPTT0 SUE;If Sue needs to select from Scott‘s DEPT table, which command should she use?()

A.SELECT*FROMDEPT;

B.SELECT*FROMSCOTT.DEPT;

C.SELECT*FROMDBASCOTTDEPT;

D.SELECT*FROMALL_USERSWHEREUSER_NAME=‘;SCOTT‘;ANDTABLENAME=‘;DEPT‘;;


参考答案:B

第7题:

Which of the following statements eliminates all but one of each set of duplicate rows in the DEPT column in the STAFF table?()

  • A、SELECT UNIQUE dept FROM staff
  • B、SELECT DISTINCT dept FROM staff
  • C、SELECT (dept) UNIQUE FROM staff
  • D、SELECT (dept) DISTINCT FROM staff

正确答案:B

第8题:

The user Sue issues this SQL statement:GRANT SELECT ON sue. EMP TO alice WITH GRANT OPTION; The user Alice issues this SQL statement:GRANT SELECT ON sue. EMP TO reena WITH GRANT OPTION; The user Reena issues this SQL statement:GRANT SELECT ON sue. EMP TO timber;The user Sue issues this SQL statement:REVOKE select on sue. EMP FROM alice;For which users does the revoke command revoke SELECT privileges on the SUE.EMP table?()

A. Alice only

B. Alice and Reena

C. Alice, Reena, and Timber

D. Sue, Alice, Reena, and Timber


参考答案:C

第9题:

The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this?()

  • A、GRANT select ON dept TO ALL_ USER;
  • B、GRANT select ON dept TO ALL;
  • C、GRANT QUERY ON dept TO ALL_USERS
  • D、GRANT select ON dept TO PUBLIC;

正确答案:D

第10题:

Evaluate the set of SQL statements: CREATE TABLE dept (deptno NUMBER(2), dname VARCHAR2(14), loc VARCHAR2(13)); ROLLBACK; DESCRIBE DEPT What is true about the set?()

  • A、The DESCRIBE DEPT statement displays the structure of the DEPT table.
  • B、The ROLLBACK statement frees the storage space occupied by the DEPT table.
  • C、The DESCRIBE DEPT statement returns an error ORA-04043: object DEPT does not exist.
  • D、The DESCRIBE DEPT statement displays the structure of the DEPT table only if there is a COMMIT statement introduced before the ROLLBACK statement.

正确答案:A

更多相关问题