多项选择题

Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
Which three statements insert a row into the table? ()

A. INSERT INTO employees VALUES (NULL, 'John', 'smith');
B. INSERT INTO employees (first_name, last_name) VALUES ('John', 'smith');
C. INSERT INTO employees VALUES ('1000, 'John', 'smith');
D. INSERT INTO employees (first_name, last_name, employee_id) VALUES (1000, 'John', 'smith');
E. INSERT INTO employees (employee_id) VALUES (1000);
F. INSERT INTO employees ( employee_id, first_name, last_name, ) VALUES (1000, 'John','');


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

You need to create a table named ORDERS that contain four columns:
1. an ORDER_ID column of number data type
2. aCUSTOMER_ID column of number data type
3. an ORDER_STATUS column that contains a character data type
4. aDATE_ORDERED column to contain the date the order was placed.
When a row is inserted into the table, if no value is provided when the order was placed, today's date should be used instead.
Which statement accomplishes this? ()

A. CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);
B. CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
C. CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);
D. CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);
E. CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);
F. CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);

2.多项选择题Which four are attributes of single row functions? ()

A. cannot be nested
B. manipulate data items
C. act on each row returned
D. return one result per row
E. accept only one argument and return only one value
F. accept arguments which can be a column or an expression

3.单项选择题Which describes the default behavior when you create a table? ()

A. The table is accessible to all users.
B. Tables are created in the public schema.
C. Tables are created in your schema.
D. Tables are created in the DBA schema.
E. You must specify the schema when the table is created.

4.单项选择题

The STUDENT_GRADES table has these columns:
STUDENT_ID NUMBER(12)
SEMESTER_END DATE
GPA NUMBER(4,3)
The registrar requested a report listing the students' grade point averages (GPA) sorted from highest grade point average to lowest.
Which statement produces a report that displays the student ID and GPA in the sorted order requested by the registrar? ()

A. SELECT student_id, gpa FROM student_grades ORDER BY gpa ASC;
B. SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa ASC;
C. SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa;
D. SELECT student_id, gpa FROM student_grades ORDER BY gpa;
E. SELECT student_id, gpa FROM student_grades SORT ORDER BY gpa DESC;
F. SELECT student_id, gpa FROM student_grades ORDER BY gpa DESC;

5.单项选择题You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()

A. ALTER TABLE students ADD PRIMARY KEY _ id;
B. ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
C. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
D. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
E. ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

6.单项选择题You are the DBA for an academic database. You need to create a role that allows a group of users to modify existing rows in the STUDENT_GRADES table. Which set of statements accomplishes this? ()

A. CREATE ROLL registrar; GRANT MODIFY ON student_grant TO registrar; GRANT registrar to user 1, user2, user3
B. CREATE NEW ROLE registrar; GRANT ALL ON student_grant TO registrar; GRANT registrar to user 1, user2, user3
C. CREATE ROLL registrar; GRANT UPDATE ON student_grant TO registrar; GRANT ROLE to user1, user2, user3
D. CREATE ROLL registrar; GRANT UPDATE ON student_grant TO registrar; GRANT registrar to user 1, user2, user3;
E. CREATE registrar; GRANT CHANGE ON student_grant TO registrar; GRANT registrar;

7.单项选择题

Evaluate this SQL statement:
SELECT ename, sal, 12* sal+100 FROM emp;
The SAL column stores the monthly salary of the employee. Which change must be made to the above
syntax to calculate the annual compensation as "monthly salary plus a monthly bonus of $100, multiplied by 12"? ()

A. No change is required to achieve the desired results.
B. SELECT ename, sal, 12* (sal+100) FROM emp;
C. SELECT ename, sal, (12* sal)+100 FROM emp;
D. SELECT ename, sal +100,*12 FROM emp;

8.单项选择题Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()

A. ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;
B. ALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;
C. ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;
D. ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;
E. ALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;
F. ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT NULL;

9.单项选择题

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 UNIQE (dept_id) FROM employees WHERE last _name='smith';

10.单项选择题Which is an iSQL*Plus command? ()

A. INSERT
B. UPDATE
C. SELECT
D. DESCRIBE
E. DELETE
F. RENAME

最新试题

Which two statements about subqueries are true? ()

题型:多项选择题

A SELECT statement can be used to perform these three functions:1. Choose rows from a table.2. Choose columns from a table3. Bring together data that is stored in different tables by creating a link between them. Which set of keywords describes these capabilities? ()

题型:单项选择题

You need to perform these tasks:1. Create and assign a MANAGER role to Blake and Clark2. Grant CREATE TABLE and CREATE VIEW privileges to Blake and ClarkWhich set of SQL statements achieves the desired results? ()

题型:单项选择题

Which constraint can be defined only at the column level? ()

题型:单项选择题

Which one is a system privilege? ()

题型:单项选择题

Which object privileges can be granted on a view? ()

题型:单项选择题

User Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She has the privilege to create a public synonym, and would like to create a synonym for this view that can be used by all users of the database. Which SQL statement can Mary use to accomplish that task?()

题型:单项选择题

Evaluate the SQL statement: TRUNCATE TABLE DEPT; Which three are true about the SQL statement? ()

题型:多项选择题

What is true regarding subqueries?()

题型:单项选择题

Evaluate these two SQL statements: SELECT last_name, salary, hire_dateFROM EMPLOYEES ORDRE BY salary DESC; SELECT last_name, salary, hire_dateFROM EMPOLYEES ORDER BY 2 DESC; What is true about them? ()

题型:单项选择题