单项选择题

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

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


您可能感兴趣的试卷

你可能感兴趣的试题

2.单项选择题

You own a table called EMPLOYEES with this table structure:
EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)
HIRE_DATE DATE
What happens when you execute this DELETE statement?
DELETE employees;()

A.You get an error because of a primary key violation.
B.The data and structure of the EMPLOYEES table are deleted.
C.The data in the EMPLOYEES table is deleted but not the structure.
D.You get an error because the statement is not syntactically correct.

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

5.多项选择题

Click the Exhibit button and examine the data from the EMP table.
The COMMISSION column shows the monthly commission earned by the employee.
Which two tasks would require subqueries or joins in order to be performed in a single step? ()

A.listing the employees who earn the same amount of commission as employee 3
B.finding the total commission earned by the employees in department 10
C.finding the number of employees who earn a commission that is higher than the average commission of the company
D.listing the departments whose average commission is more than 600
E.listing the employees who do not earn commission and who are working for department 20 in descending order of the employee ID
F.listing the employees whose annual commission is more than 6000

6.多项选择题Which two statements are true regarding the default behavior of the ORDER BY clause? ()

A.Null values are left out of the sort.
B.Character values are displayed from Z to A
C.Date values are displayed with the earliest value first.
D.Null values are displayed last for descending sequences.
E.Numeric values are displayed with the lowest values first.

7.多项选择题Which are DML statements? ()

A.COMMIT
B.MERGE
C.UPDATE
D.DELETE
E.CREATE
F.DROP...

8.单项选择题

Click the Exhibit button and examine the data in the EMPLOYEES table.
Examine the subquery:
SELECT last_name
FROM employees
WHERE salary IN (SELECT MAX(salary)
FROM employees
GROUP BY department_id);
Which statement is true?()

A.The SELECT statement is syntactically accurate.
B.The SELECT statement does not work because there is no HAVING clause.
C.The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.
D.The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.

9.多项选择题Which two are character manipulation functions? ()

A.TRIM
B.REPLACE
C.TRUNC
D.TO_DATE
E.MOD
F.CASE

10.多项选择题Which two are attributes of iSQL*Plus? ()

A.iSQL*Plus commands cannot be abbreviated.
B.iSQL*Plus commands are accessed from a browser.
C.iSQL*Plus commands are used to manipulate data in tables.
D.iSQL*Plus commands manipulate table definitions in the database.
E.iSQL*Plus is the Oracle proprietary interface for executing SQL statements.

最新试题

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

题型:单项选择题

Which two are true about aggregate functions?()

题型:多项选择题

Examine the statement: Create synonym emp for hr. employees; What happens when you issue the statement? ()

题型:单项选择题

Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary KeyFIRST_NAME VARCHAR2(25)LAST_NAME VARCHAR2(25)HIRE_DATE DATEWhich INSERT statement is valid? ()

题型:单项选择题

Which is an iSQL*Plus command? ()

题型:单项选择题

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

题型:单项选择题

Evaluate this SQL statement:SELECT e.emp_name, d.dept_nameFROM employees eJOIN departments dUSING (department_id)WHERE d.department_id NOT IN (10,40)ORSER BY dept_name;The statement fails when executed. Which change fixes the error? ()

题型:单项选择题

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

题型:单项选择题

For which action can you use the TO_DATE function? ()

题型:单项选择题

Which two statements about subqueries are true? ()

题型:多项选择题