单选题Examine the description of the CUSTOMERS table: 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) The CUSTOMER_ID column is the primary key for the table. Which statement returns the city address and the number of customers in the cities Los Angeles or San Francisco?()ASELECT city_address, COUNT(*) FROM customers WHERE city _ address IN ('Los Angeles','San Fransisco');BSELECT city_address, COUNT (*) FROM customers WHERE city address IN ( 'Los Angeles', 'San Fransisco') GROUP BY city_address;CSELECT city_address, COUNT(customer_id) FROM customers WHERE city_address IN ( 'Los Angeles', 'San Fransisco') GROUP BY city_address, customer_ id;DSELECT city_address, COUNT (customer_id) FROM customers GROUP BY city_ address IN ('Los Angeles','San Fransisco');

单选题
Examine the description of the CUSTOMERS table: 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) The CUSTOMER_ID column is the primary key for the table. Which statement returns the city address and the number of customers in the cities Los Angeles or San Francisco?()
A

SELECT city_address, COUNT(*) FROM customers WHERE city _ address IN ('Los Angeles','San Fransisco');

B

SELECT city_address, COUNT (*) FROM customers WHERE city address IN ( 'Los Angeles', 'San Fransisco') GROUP BY city_address;

C

SELECT city_address, COUNT(customer_id) FROM customers WHERE city_address IN ( 'Los Angeles', 'San Fransisco') GROUP BY city_address, customer_ id;

D

SELECT city_address, COUNT (customer_id) FROM customers GROUP BY city_ address IN ('Los Angeles','San Fransisco');


参考解析

解析: 暂无解析

相关考题:

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;

The CUSTOMERS table has these columns:CUSTOMER_ID NUMBER (4) NOT NULLCUSTOMER_NAME VARCHAR2 (100) NOT NULLSTREET_ADDRESS VARCHAR2 (150)CITY_ADDRESS VARHCAR2 (50)STATE_ADDRESS VARCHAR2 (50)PROVINCE_ADDRESS VARCHAR2 (50)COUNTRY_ADDRESS VARCHAR2 (50)POSTAL_CODE VARCHAR2 (12)CUSTOMER_PHONE VARCHAR2 (20)The CUSTOMER_ID column is the primary key for the table.You need to determine how dispersed your customer base is.Which expression finds the number of different countries represented in the CUSTOMERS table?()A. COUNT(UPPER(country_address))B. COUNT(DIFF(UPPER(country_address)))C. COUNT(UNIQUE(UPPER(country_address)))D. COUNT DISTINTC UPPER(country_address)E. COUNT(DISTINTC (UPPER(country_address)))

Examine the description of the MARKS table:SUBJ1 and SUBJ2 indicate the marks obtained by a student in two subjects.Examine this SELECT statement based on the MARKS table:What is the result of the SELECT statement?()A. The statement executes successfully and returns the student ID and sum of all marks for each student who obtained more than the average mark in each subject.B. The statement returns an error at the SELECT clause.C. The statement returns an error at the WHERE clause.D. The statement returns an error at the ORDER BY clause.

Examine the data from the ORDERS and CUSTOMERS table.Which SQL statement retrieves the order ID, customer ID, and order total for the orders that are placed on the same day that Martin places his orders?()A.B.C.D.

Examine this command:SQL exec DBMS_STATS.SET_TABLE_PREFS (‘SH’, ‘CUSTOMERS’, ‘PUBLISH’, ‘false’);Which three statements are true about the effect of this command?() A. Statistics collection is not done for the CUSTOMERS table when schema stats are gathered.B. Statistics collection is not done for the CUSTOMERS table when database stats are gathered.C. Any existing statistics for the CUSTOMERS table are still available to the optimizer at parse time.D. Statistics gathered on the CUSTOMERS table when schema stats are gathered are stored as pending statistics.E. Statistics gathered on the CUSTOMERS table when database stats are gathered are stored as pending statistics.

You need to change the definition of an existing table. The COMMERCIALS table needs its DESCRIPTION column changed to hold varying length characters up to 1000 bytes. The column can currently hold 500 bytes per value. The table contains 20000 rows. Which statement is valid?()A、ALTER TABLE commercials MODIFY (description CHAR2(1000));B、ALTER TABLE commercials CHANGE (description CHAR2(1000));C、ALTER TABLE commercials CHANGE (description VARCHAR2(1000));D、ALTER TABLE commercials MODIFY (description VARCHAR2(1000));E、You cannot increase the size of a column if the table has rows.

单选题You want to capture column group usage and gather extended statistics for better cardinality estimates for the CUSTOMERS table in the SH schema. Examine the following steps: 1. Issue the SELECT DBMS_STATS.CREATE_EXTENDED_STATS (‘SH’, ‘CUSTOMERS’) FROM dual statement. 2. Execute the DBMS_STATS.SEED_COL_USAGE (null, ‘SH’, 500) procedure. 3. Execute the required queries on the CUSTOMERS table. 4. Issue the SELECT DBMS_STATS.REPORT_COL_USAGE (‘SH’, ‘CUSTOMERS’) FROM dual statement. Identify the correct sequence of steps.()A3,2,1,4B2,3,4,1C4,1,3,2D3,2,4,1

单选题Which statement accomplish this?()ACREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);BCREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);CCREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);DCREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);ECREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);FCREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);

单选题Examine the command: SQL DBMS_STATS.SET_TABLE_PREFS(’SH’, ’CUSTOMERS’, ’PUBLISH’, ’false’);  Which statementdescribes the effect of the above command()AAutomatic statistics collection is stopped for the CUSTOMERS table.BStatistics for the CUSTOMERS table are locked and cannot be overwritten.CExisting statistics for the CUSTOMERS table become unusable for the query optimizer.DSubsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics

单选题You need to change the definition of an existing table. The COMMERCIALS table needs its DESCRIPTION column changed to hold varying length characters up to 2000 bytes. The column can currently hold 1000 bytes per value. The table contains 20000 rows. Which statement is valid?()AALTER TABLE commercials MODIFY (description CHAR2(2000));BALTER TABLE commercials CHANGE (description CHAR2(2000));CALTER TABLE commercials CHANGE (description VARCHAR2 (2000));DALTER TABLE commercials MODIFY (description VARCHAR2 (2000));EYou cannot increase the size of a column if the table has rows.

多选题Examine this command: SQL exec DBMS_STATS.SET_TABLE_PREFS (‘SH’, ‘CUSTOMERS’, ‘PUBLISH’, ‘false’); Which three statements are true about the effect of this command?()AStatistics collection is not done for the CUSTOMERS table when schema stats are gathered.BStatistics collection is not done for the CUSTOMERS table when database stats are gathered.CAny existing statistics for the CUSTOMERS table are still available to the optimizer at parse time.DStatistics gathered on the CUSTOMERS table when schema stats are gathered are stored as pending statistics.EStatistics gathered on the CUSTOMERS table when database stats are gathered are stored as pending statistics.

多选题On your Oracle Database, you issue the following commands to create indexes: SQL CREATE INDEX oe.ord_customer_ix1 ON oe.orders (customer_id, sales_rep_id) INVISIBLE; SQL CREATE BITMAP INDEX oe.ord_customer_ix2 ON oe.orders (customer_id, sales_rep_id); Which two statements are true?()AOnly the ORD_CUSTOMER_IX1 index created.BBoth the indexes are updated when a row is inserted, updated, or deleted in the ORDERS table.CBoth the indexes are created: however, only ORD_CUSTOMERS_IX1 is used by the optimizer for queries on the ORDERS table.DThe ORD_CUSTOMER_IX1 index is not used by the optimizer even when the OPTIMIZER_USE_INVISIBLE_INDEXES parameters is set to true.EBoth the indexes are created and used by the optimizer for queries on the ORDERS table.FBoth the indexes are created: however, only ORD_CUSTOMERS_IX2 is used by the optimizer for queries on the ORDERS table.

单选题Examine the command:  SQL DBMS_STATS.SET_TABLE_PREFS(’SH’, ’CUSTOMERS’, ’PUBLISH’, ’false’); Which statement describes the effect of the above command()AAutomatic statistics collection is stopped for the CUSTOMERS table.BStatistics for the CUSTOMERS table are locked and cannot be overwritten.CExisting statistics for the CUSTOMERS table become unusable for the query optimizer.DSubsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics.

单选题Examine the description of the CUSTOMERS table: 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) The CUSTOMER_ID column is the primary key for the table. Which statement returns the city address and the number of customers in the cities Los Angeles or San Francisco?()ASELECT city_address, COUNT(*) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco');BSELECT city_address, COUNT(*) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address;CSELECT city_address, COUNT(customer_id) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address, customer_id;DSELECT city_address, COUNT(customer_id) FROM customers GROUP BY city_address IN ('Los Angeles', 'San Francisco');

单选题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? ()ASELECT customer_id, customer_name FROM customers WHERE postal_code CONTAINS NULL;BSELECT customer_id, customer_name FROM customers WHER postal_code = ' ___________';CSELECT customer_id, customer_name FROM customers WHERE postal _ code IS NULL;DSELECT customer_id, customer_name FROM customers WHERE postal code IS NVL;ESELECT customer_id, customer_name FROM customers WHERE postal_code = NULL;

单选题Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()AALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;BALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;CALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;DALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;EALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;FALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT 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) The CUSTOMER_ID column is the primary key for the table. Which two statements find the number of customers?()ASELECT TOTAL(*) FROM customer;BSELECT COUNT(*) FROM customer;CSELECT TOTAL(customer_id) FROM customer;DSELECT COUNT(customer_id) FROM customer;ESELECT COUNT(customers) FROM customer;FSELECT TOTAL(customer_name) FROM customer;

单选题Examine the description of the CUSTOMERS table: 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) The CUSTOMER_ID column is the primary key for the table. Which statement returns the city address and the number of customers in the cities Los Angeles or San Francisco?()ASELECT city_address, COUNT(*) FROM customers WHERE city _ address IN ('Los Angeles','San Fransisco');BSELECT city_address, COUNT (*) FROM customers WHERE city address IN ( 'Los Angeles', 'San Fransisco') GROUP BY city_address;CSELECT city_address, COUNT(customer_id) FROM customers WHERE city_address IN ( 'Los Angeles', 'San Fransisco') GROUP BY city_address, customer_ id;DSELECT city_address, COUNT (customer_id) FROM customers GROUP BY city_ address IN ('Los Angeles','San Fransisco');

单选题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) The CUSTOMER_ID column is the primary key for the table. You need to determine how dispersed your customer base is. Which expression finds the number of different countries represented in the CUSTOMERS table?()ACOUNT(UPPER(country_address))BCOUNT(DIFF(UPPER(country_address)))CCOUNT(UNIQUE(UPPER(country_address)))DCOUNT DISTINCT UPPER(country_address)ECOUNT(DISTINCT (UPPER(country_address)))