问题:多选题Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()ASER_NOBORDER_IDCSTATUSDPROD_IDEORD_TOTALFcomposite index on ORDER_ID and ORDER_DATE
查看答案
问题:单选题Evaluate the SQL statement: SELECT ROUND(TRUNC(MOD(1600,10),-1),2) FROM dual; What will be displayed?()A 0B 1C 0.00D An error statement
问题:多选题Which three statements about subqueries are true?()AA single row subquery can retrieve only one column and one row.BA single row subquery can retrieve only one row but many columns.CA multiple row subquery can retrieve multiple rows and multiple columns.DA multiple row subquery can be compared by using the > operator.EA single row subquery can use the IN operator.FA multiple row subquery can use the = operator.
问题:单选题Which is an iSQL*Plus command?()A INSERTB UPDATEC SELECTD DESCRIBEE DELETEF RENAME
问题:单选题The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) Which statement finds the rows in the CUSTOMERS table that do not have a postal code?()A SELECT customer_id, customer_name FROM customers WHERE postal_code CONTAINS NULL;B SELECT customer_id, customer_name FROM customers WHER postal_code = ' ___________';C SELECT customer_id, customer_name FROM customers WHERE postal _ code IS NULL;D SELECT customer_id, customer_name FROM customers WHERE postal code IS NVL;E SELECT customer_id, customer_name FROM customers WHERE postal_code = NULL;
问题:单选题What does the TRUNCATE statement do?()A Removes the tableB Removes all rows from a tableC Shortens the table to 10 rowsD Removes all columns from a tableE Removes foreign keys from a table
问题:多选题Evaluate the SQL statement DROP TABLE DEPT: Which four statements are true of the SQL statement? ()AYou cannot roll back this statement.BAll pending transactions are committed.CAll views based on the DEPT table are deleted.DAll indexes based on the DEPT table are dropped.EAll data in the table is deleted, and the table structure is also deleted.FAll data in the table is deleted, but the structure of the table is retained.GAll synonyms based on the DEPT table are deleted.
问题:单选题Evaluate these two SQL statements: SELECT last_name, salary , hire_date FROM EMPLOYEES ORDER BY salary DESC; SELECT last_name, salary , hire_date FROM EMPLOYEESORDER BY 2 DESC; What is true about them?()A The two statements produce identical results.B The second statement returns a syntax error.C There is no need to specify DESC because the results are sorted in descending order by default.D The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.
问题:单选题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 );
问题:单选题The STUDENT_GRADES table has these columns: STUDENT_ID NUMBER(12) SEMESTER_END DATE GPA NUMBER(4,3) The registrar has asked for a report on the average grade point average (GPA) for students enrolled during semesters that end in the year 2000. Which statement accomplish this? ()A SELECT AVERAGE(gpa) FROM student_grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';B SELECT COUNT(gpa) FROM student grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';C SELECT MIN(gpa) FROM student grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';D SELECT AVG(gpa) FROM student_grades WHERE semester _ end BETWEEN '01-JAN-2000' and '31-DEC-2000';E SELECT SUM(gpa) FROM student grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';F SELECT MEDIAN(gpa) FROM student_grades WHERE semester _ end > '01-JAN-2000' and semester end <31-DEC-2000';
问题:单选题Which SQL statement returns a numeric value?()A SELECT ADD_MONTHS(MAX(hire_Date), 6) FROM EMP;B SELECT ROUND(hire_date) FROM EMP;C SELECT sysdate-hire_date FROM EMP;D SELECT TO_NUMBER(hire_date + 7) FROM EMP;
问题:多选题Which four are valid Oracle constraint types? ()ACASCADEBUNIQUECNONUNIQUEDCHECKEPRIMARY KEYFCONSTANTGNOT NULL
问题:单选题The CUSTOMERS table has these columns: CUSTOMER_ID NUMBER(4) NOT NULL CUSTOMER_NAME VARCHAR2(100) NOT NULL STREET_ADDRESS VARCHAR2(150) CITY_ADDRESS VARCHAR2(50) STATE_ADDRESS VARCHAR2(50) PROVINCE_ADDRESS VARCHAR2(50) COUNTRY_ADDRESS VARCHAR2(50) POSTAL_CODE VARCHAR2(12) CUSTOMER_PHONE VARCHAR2(20) A promotional sale is being advertised to the customers in France. Which WHERE clause identifies customers that are located in France?()A WHERE lower(country_address) = franceB WHERE lower(country_address) = 'france'C WHERE lower(country_address) IS 'france'D WHERE lower(country_address) = '%france%'E WHERE lower(country_address) LIKE %france%
问题:单选题Evaluate the SQL statement:SELECT ROUND(45.953, -1), TRUNC(45.936, 2)FROM dual;Which values are displayed?()A 46 and 45B 46 and 45.93C 50 and 45.93D 50 and 45.9E 45 and 45.93F 45.95 and 45.93
问题:多选题In which four clauses can a subquery be used?()Ain the INTO clause of an INSERT statementBin the FROM clause of a SELECT statementCin the GROUP BY clause of a SELECT statementDin the WHERE clause of a SELECT statementEin the SET clause of an UPDATE statementFin the VALUES clause of an INSERT statement
问题:单选题Evaluate the SQL statement: 1 SELECT a.emp_name, a.sal, a.dept_id, b.maxsal 2 FROM employees a, 3 (SELECT dept_id, MAX(sal) maxsal 4. FROM employees 5 GROUP BY dept_id) b 6 WHERE a.dept_id = b.dept_id 7 AND a. asl < b. maxsal; What is the result of the statement?()A The statement produces an error at line 1.B The statement produces an error at line 3.C The statement produces an error at line 6.D The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all departments that pay less salary then the maximum salary paid in the company.E The statement returns the employee name, salary, department ID, and maximum salary earned in the department of the employee for all employees who earn less than the maximum salary in their department.
问题:多选题Which four are types of functions available in SQL? ()AstringBcharacterCintegerDcalendarEnumericFtranslationGdateHconversion
问题:单选题In which case would you use a FULL OUTER JOIN?()A Both tables have NULL values.B You want all unmatched data from one table.C You want all matched data from both tables.D You want all unmatched data from both tables.E One of the tables has more data than the other.F You want all matched and unmatched data from only one table.
问题:多选题Which four are correct guidelines for naming database tables? ()AMust begin with either a number or a letter.BMust be 1-30 characters long.CShould not be an Oracle Server reserved word.DMust contain only A-Z, a-z, 0-+, _, *, and #.EMust contain only A-Z, a-z, 0-9, _, $, and #.FMust begin with a letter.
问题:单选题Management has asked you to calculate the value 12*salary* commission_pct for all the employees in the EMP table. The EMP table contains these columns: LAST NAME VARCNAR2(35) NOT NULL SALARY NUMBER(9,2) NOT NULL COMMISION_PCT NUMBER(4,2) Which statement ensures that a value is displayed in the calculated columns for all employees?()A SELECT last_name, 12*salary* commission_pct FROM emp;B SELECT last_name, 12*salary* (commission_pct,0) FROM emp;C SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;D SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;