Scott issues the SQL statements: CREATE TABLE dept (deptno N

题目
单选题
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题:

CREATE TABLE dept(deptno NUMBER(2),dname VARCNAR2(14),1oc VARCNAR2 (13));ROLLBACK;DESCRIBE DEPTWhat 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 occupies 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

第2题:

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

第3题:

The DBA issues this SQL command: CREATE USER scott IDENTIFIED by tiger; What privileges does the user Scott have at this point?()

A. no privileges

B. only the SELECT privilege

C. only the CONNECT privilege

D. all the privileges of a default user


参考答案:A

第4题:

Given the following requirements: Create a table to contain employee data, with a unique numeric identifier automatically assigned when a row is added, has an EDLEVEL column that permits only the values 'C', 'H' and 'N', and permits inserts only when a corresponding value for the employee's department exists in the DEPARTMENT table. Which of the following CREATE statements will successfully create this table?()

  • A、CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED ALWAYS AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1), PRIMARY KEY emp_pk (empno), FOREIGN KEY emp_workdept_fk ON (workdept) REFERENCES department (deptno), CHECK edlevel_ck VALUES (edlevel IN ('C','H','N')), );
  • B、CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK edlevel VALUES ('C','H','N') );
  • C、CREATE TABLE emp ( empno SMALLINT NEXTVAL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3) NOT NULL, edlevel CHAR(1) CHECK IN ('C','H','N')), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY department (deptno) REFERENCES (workdept) );
  • D、CREATE TABLE emp ( empno SMALLINT NOT NULL GENERATED BY DEFAULT AS IDENTITY, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, workdept CHAR(3), edlevel CHAR(1), CONSTRAINT emp_pk PRIMARY KEY (empno), CONSTRAINT emp_workdept_fk FOREIGN KEY (workdept) REFERENCES department (deptno), CONSTRAINT edlevel_ck CHECK (edlevel IN ('C','H','N')) );

正确答案:D

第5题:

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

第6题:

Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table? ()

A. CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) NOT NULL CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);

B. CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

C. CREATE TABLE EMP (empno NUMBER(4) ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));

D. CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));


参考答案:B

第7题:

Evaluate the set of SQL statements: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 occupies 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

第8题:

Evaluate the SQL statement DROP TABLE DEPT: Which four statements are true of the SQL statement? ()

A. You cannot roll back this statement.

B. All pending transactions are committed.

C. All views based on the DEPT table are deleted.

D. All indexes based on the DEPT table are dropped.

E. All data in the table is deleted, and the table structure is also deleted.

F. All data in the table is deleted, but the structure of the table is retained.

G. All synonyms based on the DEPT table are deleted.


参考答案:A, B, D, E

第9题:

下面哪一个SQL语句将删除DEPT表中的所有数据,并永久删除DEPT表的整个结构()

  • A、DROP TABLE dept;
  • B、DELETE TABLE dept;
  • C、TRUNCATE TABLE dept;
  • D、DELETE * . * FROM dept; [END CODE]"

正确答案:A

第10题:

The HR user creates a stand-alone procedure as follows and grants the EXECUTE privilege on the procedureto many database users: CREATE OR REPLACE PROCEDURE create_dept ( v_deptno NUMBER, v_dname VARCHAR2, v_mgrNUMBER, v_loc NUMBER)BEGIN INSERT INTO hr.departments VALUES (v_deptno, v_dname, v_mgr, v_loc); END; The users having permission to execute the procedure are able to insert records into the DEPARTMENTS tableeven though they do not have the INSERT privilege on the table. You want only those users who haveprivileges on the DEPARTMENTS table to be able to execute the procedure successfully.  What would yousuggest to the PL/SQL developers to achieve this()

  • A、Create the procedure with definer’s right.
  • B、Create the procedure with invoker’s right.
  • C、Grant the EXECUTE privilege with GRANT OPTION on the procedure to selected users.
  • D、Create the procedure as part of a PL/SQL package and grant the EXECUTE privilege on the package toselected users

正确答案:B

更多相关问题