单项选择题You need to display the last names of those employees who have the letter “A” as the second character in their names.Which SQL statement displays the required results?()

A. SELECT last_name   FROM EMP   WHERE last_name LIKE ‘_A%’;
B. SELECT last_name   FROM EMP   WHERE last name =’*A%’
C. SELECT last_name   FROM EMP   WHERE last name =’_A%’;
D. SELECT last_name   FROM EMP   WHERE last name LIKE ‘*A%’


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题Which two statements about subqueries are true? ()

A. A subquery should retrieve only one row.
B. A subquery can retrieve zero or more rows.
C. A subquery can be used only in SQL query statements.
D. Subqueries CANNOT be nested by more than two levels.
E. A subquery CANNOT be used in an SQL query statement that uses group functions.
F. When a subquery is used with an inequality comparison operator in the outer SQL statement, the column list in the SELECT clause of the subquery should contain only one column.

2.单项选择题

Examine these statements:
CREATE ROLE registrar
GRANT UPDATE ON dtudent_grades TO registrar;
GRANT registrar to user1, user2, user3;
What does this set of SQL statements do?()

A. The set of statements contains an error and does not work.
B. It creates a role called REGISTRAR, adds the MODIFY privilege on the STUDENT_GRADES object to the role, and gives the REGISTRAR role to three users.
C. It creates a role called REGISTRAR, adds the UPDATE privilege on the STUDENT_GRADES object to the role, and gives the REGISTRAR role to three users.
D. It creates a role called REGISTRAR, adds the UPDATE privilege on the STUDENT_GRADES object to the role, and creates three users with the role.
E. It creates a role called REGISTRAR, adds the UPDATE privilege on three users, and gives the REGISTRAR role to the STUDENT_GRADES object.
F. It creates a role called STUDENT_GRADES, adds the UPDATE privilege on three users, and gives the UPDATE role to the registrar.

3.单项选择题

Examine the data from the ORDERS and CUSTOMERS tables.

Evaluate the SQL statement:

What is the result when the query is executed?()

A.
B.
C.
D. The query fails because the subquery returns more than one row.
E. The query fails because the outer query and the inner query are using different tables.

4.单项选择题Which view should a user query to display the columns associated with the constraints on a table owned by the user?()

A. USER_CONSTRAINTS
B. USER_OBJECTS
C. ALL_CONSTRAINTS
D. USER_CONS_COLUMNS
E. USER_COLUMNS

5.单项选择题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;

6.单项选择题

Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER NOT NULL
EMP_NAME VARCHAR2(30)
JOB_ID VARCHAR2(20)
SAL NUMBER
MGR_ID NUMBER
DEPARTMENT_ID NUMBER
You want to create a SQL script file that contains an INSERT statement. When the script is run, the INSERT statement should insert a row with the specified values into the EMPLOYEES table. The INSERT statement should pass values to the table columns as specified below:
EMPLOYEE_ID: Next value from the sequence
EMP_ID_SEQEMP_NAME and JOB_ID: As specified by the user during run time, through substitution variables
SAL: 2000
MGR_ID: No value
DEPARTMENT_ID: Supplied by the user during run time through substitution variable. The INSERT statement should fail if the user supplies a value other than 20 or 50.
Which INSERT statement meets the above requirements?()

A. INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);
B. INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did IN (20,50));
C. INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50)) VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);
D. INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50) WITH CHECK OPTION) VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);
E. INSERT INTO (SELECT * FROM employees WHERE (department_id = 20 AND department_id = 50) WITH CHECK OPTION ) VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);

7.单项选择题Which constraint can be defined only at the column level?()

A. UNIQUE
B. NOT NULL
C. CHECK
D. PRIMARY KEY
E. FOREIGN KEY

8.多项选择题In which two cases would you use an outer join?()

A. The tables being joined have NOT NULL columns.
B. The tables being joined have only matched data.
C. The columns being joined have NULL values.
D. The tables being joined have only unmatched data.
E. The tables being joined have both matched and unmatched data.
F. Only when the tables have a primary key/foreign key relationship.

9.单项选择题

The PRODUCTS table has these columns:
PRODUCT_ID NUMBER(4)
PRODUCT_NAME VARCHAR2(45)
PRICE NUMBER(8,2)
Evaluate this SQL statement:
SELECT *
FROM PRODUCTS
ORDER BY price, product _ name;
What is true about the SQL statement?()

A. The results are not sorted.
B. The results are sorted numerically.
C. The results are sorted alphabetically.
D. The results are sorted numerically and then alphabetically.

10.单项选择题

Examine the structure of the EMPLOYEES, DEPARTMENTS, and TAX tables.

For which situation would you use a nonequijoin query?()

A. To find the tax percentage for each of the employees.
B. To list the name, job id, and manager name for all the employees.
C. To find the name, salary, and department name of employees who are not working with Smith.
D. To find the number of employees working for the Administrative department and earning less then 4000.
E. To display name, salary, manager ID, and department name of all the employees, even if the employees do not have a department ID assigned.

最新试题

Which two statements are true about constraints? ()

题型:多项选择题

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? ()

题型:单项选择题

Which two statements about subqueries are true? ()

题型:多项选择题

You need to design a student registration database that contains several tables storing academic information.The STUDENTS table stores information about a student. The STUDENT_GRADES table storesinformation about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key.You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table thatpoints to the STUDENT_ID column of the STUDENTS table. Which statement creates the foreign key?()

题型:单项选择题

Which is an iSQL*Plus command? ()

题型:单项选择题

Examine these statements:CREATE ROLE registrarGRANT UPDATE ON dtudent_grades TO registrar;GRANT registrar to user1, user2, user3;What does this set of SQL statements do? ()

题型:单项选择题

Which three are true? ()

题型:多项选择题

The PRODUCTS table has these columns:PRODUCT_ID NUMBER(4)PRODUCT_NAME VARCHAR2(45)PRICE NUMBER(8,2)Evaluate this SQL statement:SELECT *FROM PRODUCTSORDER BY price, product _ name;What is true about the SQL statement? ()

题型:单项选择题

Which view should a user query to display the columns associated with the constraints on a table owned by the user? ()

题型:单项选择题

Which SQL statement displays the date March 19, 2001 in a format that appears as "Nineteenth of March 2001 12:00:00 AM"? ()

题型:单项选择题