单选题You need to produce a report for mailing labels for all customers. The mailing label must have only the customer name and address. The CUSTOMERS table has these columns: Which SELECT statement accomplishes this task?()ASELECT* FROM customers;BSELECT

题目
单选题
You need to produce a report for mailing labels for all customers. The mailing label must have only the customer name and address. The CUSTOMERS table has these columns: Which SELECT statement accomplishes this task?()
A

SELECT*   FROM customers;

B

SELECT name, address   FROM customers;

C

SELECT id, name, address, phone   FROM customers;

D

SELECT cust_name, cust_address   FROM customers;

E

SELECT cust_id, cust_name, cust_address, cust_phone   FROM customers;


相似考题
更多“单选题You need to produce a report for mailing labels for all customers. The mailing label must have only the customer name and address. The CUSTOMERS table has these columns: Which SELECT statement accomplishes this task?()A SELECT* FROM customers;B SELE”相关问题
  • 第1题:

    You need to generate a list of all customer last names with their credit limits from the CUSTOMERS table. Those customers who do not have a credit limit should appear last in the list. Which two queries would achieve the required result?()

    • A、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit DESC
    • B、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit
    • C、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit NULLS LAST
    • D、SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_last_name, cust_credit_limit NULLSLAST

    正确答案:B,C

  • 第2题:

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

    • A、SELECT TOTAL(*) FROM customer;
    • B、SELECT COUNT(*) FROM customer;
    • C、SELECT TOTAL(customer_id) FROM customer;
    • D、SELECT COUNT(customer_id) FROM customer;
    • E、SELECT COUNT(customers) FROM customer;
    • F、SELECT TOTAL(customer_name) FROM customer;

    正确答案:B,D

  • 第3题:

    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;

    正确答案:C

  • 第4题:

    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%'

    正确答案:A

  • 第5题:

    36 You are creating a report wizard to create a matrix report. The query build, you select the patient_name column from the patient table; the doctor_name from the doctors table; and the doctor_ID, patient_ID and ID columns from the procedure table. In the report wizard you select patient_name as the row value, doctor_ID as the column values and the count as the cell values. You need to add a total for each doctors column. In the wizard report which tab will allow you to create the summary column?()

    • A、Rows 
    • B、Totals 
    • C、Columns 
    • D、Cells 
    • E、Data

    正确答案:B

  • 第6题:

    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;

    正确答案:C

  • 第7题:

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


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

  • 第8题:

    单选题
    You need to produce a report for mailing labels for all customers. The mailing label must have only the customer name and address. The CUSTOMERS table has these columns: CUST_ID NUMBER(4) NOT NULL CUST_NAME VARCHAR2(100) NOT NULL CUST_ADDRESS VARCHAR2(150) CUST_PHONE VARCHAR2(20) Which SELECT statement accomplishes this task?()
    A

    SELECT* FROM customers;

    B

    SELECT name, address FROM customers;

    C

    SELECT id, name, address, phone FROM customers;

    D

    SELECT cust_name, cust_address FROM customers;

    E

    SELECT cust_id, cust_name, cust_address, cust_phone FROM customers;


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

  • 第9题:

    单选题
    You need to produce a report for mailing labels for all customers. The mailing label must have only the customer name and address. The CUSTOMERS table has these columns: CUST_ID NUMBER(4) NOT NULL CUST_NAME VARCHAR2(100) NOT NULL CUST_ADDRESS VARCHAR2(150) CUST_PHONE VARCHAR2(20) Which SELECT statement accomplishes this task?()
    A

    SELECT* FROM customers;

    B

    SELECT name, address FROM customers;

    C

    SELECT id, name, address, phone FROM customers;

    D

    SELECT cust_name, cust_address FROM customers;

    E

    SELECT cust_id, cust_name, cust_address, cust_phone FROM customers;


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

  • 第10题:

    单选题
    36 You are creating a report wizard to create a matrix report. The query build, you select the patient_name column from the patient table; the doctor_name from the doctors table; and the doctor_ID, patient_ID and ID columns from the procedure table. In the report wizard you select patient_name as the row value, doctor_ID as the column values and the count as the cell values. You need to add a total for each doctors column. In the wizard report which tab will allow you to create the summary column?()
    A

    Rows 

    B

    Totals 

    C

    Columns 

    D

    Cells 

    E

    Data


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

  • 第11题:

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


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

  • 第12题:

    ( 难度:中等)在Hive中,以下哪个SQL语句是错误的
    A.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > LEFT OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID);
    B.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > RIGHT OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID);
    C.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > FULL OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID);
    D.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > FULL OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID OR Name = o.Name);

    答案:D

  • 第13题:

    You need to replicate a table from a master to a slave. The master and slave copies of the table will have different number of columns. Which two conditions must be true?()

    • A、Each extra column in the copy with more columns must not have a default value
    • B、Columns that are common to both versions of the table must be defined in the same order on the master and the slave
    • C、The slave database cannot have more columns than the master. Only the master database can have more columns
    • D、Columns that are common to both versions of the table must come first in the table definition, before any additional columns are additional columns are defined on either server
    • E、The master database cannot have more columns than the slave. Only the slave deatbase can have more columns

    正确答案:B,D

  • 第14题:

    The EMPLOYEE tables has these columns: LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) COMMISSION_PCT NUMBER(5,2) You want to display the name and annual salary multiplied by the commission_pct for all employees. For records that have a NULL commission_pct, a zero must be displayed against the calculated column. Which SQL statement displays the desired results?()

    • A、SELECT last_name, (salary * 12) * commission_pct FROM EMPLOYEES;
    • B、SELECT last_name, (salary * 12) * IFNULL(commission_pct, 0) FROM EMPLOYEES;
    • C、SELECT last_name, (salary * 12) * NVL2(commission_pct, 0) FROM EMPLOYEES;
    • D、SELECT last_name, (salary * 12) * NVL(commission_pct, 0) FROM EMPLOYEES;

    正确答案:D

  • 第15题:

    Which two are true about aggregate functions? ()

    • A、You can use aggregate functions in any clause of a SELECT statement.
    • B、You can use aggregate functions only in the column list of the select clause and in the WHERE clause of a SELECT statement.
    • C、You can mix single row columns with aggregate functions in the column list of a SELECT statement by grouping on the single row columns.
    • D、You can pass column names, expressions, constants, or functions as parameter to an aggregate function.
    • E、You can use aggregate functions on a table, only by grouping the whole table as one single group.
    • F、You cannot group the rows of a table by more than one column while using aggregate functions.

    正确答案:A,D

  • 第16题:

    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

  • 第17题:

    Which SQL statement accepts user input for the columns to be displayed, the table name, and WHERE condition? ()

    • A、SELECT &1, "&2" FROM &3 WHERE last_name = '&8';
    • B、SELECT &1, '&2' FROM &3 WHERE '& last_name = '&8';
    • C、SELECT &1, &2 FROM &3 WHERE last_name = '&8';
    • D、SELECT &1, '&2' FROM EMP WHERE last_name = '&8';

    正确答案:C

  • 第18题:

    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 Francisco');
    • B、SELECT city_address, COUNT(*) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address;
    • C、SELECT city_address, COUNT(customer_id) FROM customers WHERE city_address IN ('Los Angeles', 'San Francisco') GROUP BY city_address, customer_id;
    • D、SELECT city_address, COUNT(customer_id) FROM customers GROUP BY city_address IN ('Los Angeles', 'San Francisco');

    正确答案:B

  • 第19题:

    单选题
    Click the Exhibit button and examine the data from the ORDERS and CUSTOMERS tables. Which SQL statement retrieves the order ID, customer ID, and order total for the orders that are placed on the same day that Martin placed his orders?()
    A

    SELECT ord_id, cust_id, ord_total FROM orders, customers WHERE cust_name='Martin' AND ord_date IN ('18-JUL-2000','21-JUL-2000');

    B

    SELECT ord_id, cust_id, ord_total FROM orders WHERE ord_date IN (SELECT ord_date FROM orders WHERE cust_id = (SELECT cust_id FROM customers WHERE cust_name = 'Martin'));

    C

    SELECT ord_id, cust_id, ord_total FROM orders WHERE ord_date IN (SELECT ord_date FROM orders, customers WHERE cust_name = 'Martin');

    D

    SELECT ord_id, cust_id, ord_total FROM orders WHERE cust_id IN (SELECT cust_id FROM customers WHERE cust_name = 'Martin');


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

  • 第20题:

    单选题
    It can be inferred from the passage that the writer suggests companies should
    A

    attract the more profitable customers.

    B

    pay equal attention to all the customers.

    C

    increase the investments in customer loyalty.

    D

    focus only on loyal customers.


    正确答案: C
    解析:
    从第五段第二、三句“…companies will have to find ways to measure the relationship between loyalty and profitability so that they can better identify which customers to focus on and which to ignore”可以推测作者建议公司要吸引那些可以带来利益的顾客。故选A。

  • 第21题:

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


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

  • 第22题:

    多选题
    You need to replicate a table from a master to a slave. The master and slave copies of the table will have different number of columns. Which two conditions must be true?()
    A

    Each extra column in the copy with more columns must not have a default value

    B

    Columns that are common to both versions of the table must be defined in the same order on the master and the slave

    C

    The slave database cannot have more columns than the master. Only the master database can have more columns

    D

    Columns that are common to both versions of the table must come first in the table definition, before any additional columns are additional columns are defined on either server

    E

    The master database cannot have more columns than the slave. Only the slave deatbase can have more columns


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

  • 第23题:

    多选题
    You need to generate a list of all customer last names with their credit limits from the CUSTOMERS table. Those customers who do not have a credit limit should appear last in the list. Which two queries would achieve the required result?()
    A

    SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit DESC

    B

    SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit

    C

    SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit NULLS LAST

    D

    SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_last_name, cust_credit_limit NULLSLAST


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