1Z0-007

单选题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

题目
单选题
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');

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

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.


参考答案:C

第2题:

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.


参考答案:A, C, D

第3题:

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;


参考答案:C

第4题:

单选题
Examine the command: SQL> DBMS_STATS.SET_TABLE_PREFS(’SH’, ’CUSTOMERS’, ’PUBLISH’, ’false’);  Which statementdescribes the effect of the above command()
A

Automatic statistics collection is stopped for the CUSTOMERS table.

B

Statistics for the CUSTOMERS table are locked and cannot be overwritten.

C

Existing statistics for the CUSTOMERS table become unusable for the query optimizer.

D

Subsequently, statistics gathered on the CUSTOMERS table are stored as pending statistics


正确答案: D
解析: 暂无解析

第5题:

单选题
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.()
A

3,2,1,4

B

2,3,4,1

C

4,1,3,2

D

3,2,4,1


正确答案: B
解析: 暂无解析

第6题:

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.


参考答案:B

第7题:

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.

正确答案:D

第8题:

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


参考答案:E

第9题:

单选题
Which statement accomplish 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 NUMBER (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);


正确答案: C
解析: 暂无解析

第10题:

单选题
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?()
A

ALTER TABLE commercials MODIFY (description CHAR2(2000));

B

ALTER TABLE commercials CHANGE (description CHAR2(2000));

C

ALTER TABLE commercials CHANGE (description VARCHAR2 (2000));

D

ALTER TABLE commercials MODIFY (description VARCHAR2 (2000));

E

You cannot increase the size of a column if the table has rows.


正确答案: B
解析: 暂无解析

更多相关问题