SELECT* FROM customers;
SELECT name, address FROM customers;
SELECT id, name, address, phone FROM customers;
SELECT cust_name, cust_address FROM customers;
SELECT cust_id, cust_name, cust_address, cust_phone FROM customers;
第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?()
第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? ()
第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?()
第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? ()
第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?()
第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? ()
第7题:
3,2,1,4
2,3,4,1
4,1,3,2
3,2,4,1
第8题:
SELECT* FROM customers;
SELECT name, address FROM customers;
SELECT id, name, address, phone FROM customers;
SELECT cust_name, cust_address FROM customers;
SELECT cust_id, cust_name, cust_address, cust_phone FROM customers;
第9题:
SELECT* FROM customers;
SELECT name, address FROM customers;
SELECT id, name, address, phone FROM customers;
SELECT cust_name, cust_address FROM customers;
SELECT cust_id, cust_name, cust_address, cust_phone FROM customers;
第10题:
Rows
Totals
Columns
Cells
Data
第11题:
ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;
ALTER TABLE customers MODIFY CONSTRAINT cust_name_nn CHECK customer_name IS NOT NULL;
ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn NOT NULL;
ALTER TABLE customers MODIFY customer_name CONSTRAINT cust_name_nn IS NOT NULL;
ALTER TABLE customers MODIFY name CONSTRAINT cust_name_nn NOT NULL;
ALTER TABLE customers ADD CONSTRAINT cust_name_nn CHECK customer_name NOT NULL;
第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?()
第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?()
第15题:
Which two are true about aggregate functions? ()
第16题:
Which statement adds a constraint that ensures the CUSTOMER_NAME column of the CUSTOMERS table holds a value?()
第17题:
Which SQL statement accepts user input for the columns to be displayed, the table name, and WHERE condition? ()
第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?()
第19题:
SELECT ord_id, cust_id, ord_total FROM orders, customers WHERE cust_name='Martin' AND ord_date IN ('18-JUL-2000','21-JUL-2000');
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'));
SELECT ord_id, cust_id, ord_total FROM orders WHERE ord_date IN (SELECT ord_date FROM orders, customers WHERE cust_name = 'Martin');
SELECT ord_id, cust_id, ord_total FROM orders WHERE cust_id IN (SELECT cust_id FROM customers WHERE cust_name = 'Martin');
第20题:
attract the more profitable customers.
pay equal attention to all the customers.
increase the investments in customer loyalty.
focus only on loyal customers.
第21题:
SELECT customer_id, customer_name FROM customers WHERE postal_code CONTAINS NULL;
SELECT customer_id, customer_name FROM customers WHER postal_code = ' ___________';
SELECT customer_id, customer_name FROM customers WHERE postal _ code IS NULL;
SELECT customer_id, customer_name FROM customers WHERE postal code IS NVL;
SELECT customer_id, customer_name FROM customers WHERE postal_code = NULL;
第22题:
Each extra column in the copy with more columns must not have a default value
Columns that are common to both versions of the table must be defined in the same order on the master and the slave
The slave database cannot have more columns than the master. Only the master database can have more columns
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
The master database cannot have more columns than the slave. Only the slave deatbase can have more columns
第23题:
SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit DESC
SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit
SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit NULLS LAST
SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_last_name, cust_credit_limit NULLSLAST