itgle.com

多选题Where can subqueries be used?()Afield names in the SELECT statementBthe FROM clause in the SELECT statementCthe HAVING clause in the SELECT statementDthe GROUP BY clause in the SELECT statementEthe WHERE clause in only the SELECT statementFthe WHERE cl

题目
多选题
Where can subqueries be used?()
A

field names in the SELECT statement

B

the FROM clause in the SELECT statement

C

the HAVING clause in the SELECT statement

D

the GROUP BY clause in the SELECT statement

E

the WHERE clause in only the SELECT statement

F

the WHERE clause in SELECT as well as all DML statements


相似考题
更多“多选题Where can subqueries be used?()Afield names in the SELECT statementBthe FROM clause in the SELECT statementCthe HAVING clause in the SELECT statementDthe GROUP BY clause in the SELECT statementEthe WHERE clause in only the SELECT statementFthe WHERE cl”相关问题
  • 第1题:

    In which of the following situations should correlation names be used?()

    A.A table referenced in the FROM clause has no indexed column.

    B.The table referenced in the FROM clause has more than 200 columns.

    C.Two or more tables in the FROM clause have identical column names.

    D.The FROM clause contains two or more tables in the SELECT statement.


    参考答案:C

  • 第2题:

    对于满足SQL92标准的SQL语句:  select foo,count(foo)from pokes where foo>10group by foo having count (*)>5 order by foo   其执行顺序应该是()。

    • A、FROM->WHERE->GROUP BY->HAVING->SELECT->ORDER BY
    • B、FROM->GROUP BY->WHERE->HAVING->SELECT->ORDER BY
    • C、FROM->WHERE->GROUP BY->HAVING->ORDER BY->SELECT
    • D、FROM->WHERE->ORDER BY->GROUP BY->HAVING->SELECT

    正确答案:A

  • 第3题:

    Which two statements are true about WHERE and HAVING clauses? ()

    • A、A WHERE clause can be used to restrict both rows and groups.
    • B、A WHERE clause can be used to restrict rows only.
    • C、A HAVING clause can be used to restrict both rows and groups.
    • D、A HAVING clause can be used to restrict groups only.
    • E、A WHERE clause CANNOT be used in a query of the query uses a HAVING clause.
    • F、A HAVING clause CANNOT be used in subqueries.

    正确答案:B,D

  • 第4题:

    Which two statements are true regarding the ORDER BY clause? ()

    • A、It is executed first in the query execution 
    • B、It must be the last clause in the SELECT statement 
    • C、It cannot be used in a SELECT statement containing a HAVING clause
    • D、You cannot specify a column name followed by an expression in this clause 
    • E、You can specify a combination of numeric positions and column names in this clause

    正确答案:B,E

  • 第5题:

    Which two statements are true regarding subqueries? ()

    • A、A subquery can retrieve zero or more rows 
    • B、Only two subqueries can be placed atone level 
    • C、A subquery can be used only in SQL query statements 
    • D、A subquery can appear on either side of a comparison operator 
    • E、There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement 

    正确答案:A,D

  • 第6题:

    Which two statements about views are true?()

    • A、A view can be created as read only.
    • B、A view can be created as a join on two or more tables.
    • C、A view cannot have an ORDER BY clause in the SELECT statement.
    • D、A view cannot be created with a GROUP BY clause in the SELECT statement.
    • E、A view must have aliases defined for the column names in the SELECT statement.

    正确答案:A,B

  • 第7题:

    Which two statements are true regarding the USING and ON clauses in table joins?()

    • A、Both USING and ON clauses can be used for equijoins and nonequijoins 
    • B、Amaximum of one pair of columns can be joined between two tables using the ON clause 
    • C、The ON clause can be used to join tables on columns that have different names but compatible data types 
    • D、The WHERE clause can be used to apply additional conditions in SELECT statements containing the ON or the USING clause 

    正确答案:C,D

  • 第8题:

    单选题
    In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed in the SELECT statement?()
    A

    Immediately after the SELECT clause

    B

    Before the WHERE clause

    C

    Before the FROM clause

    D

    After the ORDER BY clause

    E

    After the WHERE clause


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

  • 第9题:

    多选题
    Which two statements are true regarding the USING and ON clauses in table joins?()
    A

    Both USING and ON clauses can be used for equijoins and nonequijoins

    B

    Amaximum of one pair of columns can be joined between two tables using the ON clause

    C

    The ON clause can be used to join tables on columns that have different names but compatible data types

    D

    The WHERE clause can be used to apply additional conditions in SELECT statements containing the ON or the USING clause


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

  • 第10题:

    多选题
    Which two statements about views are true?()
    A

    A view can be created as read only.

    B

    A view can be created as a join on two or more tables.

    C

    A view cannot have an ORDER BY clause in the SELECT statement.

    D

    A view cannot be created with a GROUP BY clause in the SELECT statement.

    E

    A view must have aliases defined for the column names in the SELECT statement.


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

  • 第11题:

    多选题
    In which four clauses can a subquery be used? ()
    A

    in the INTO clause of an INSERT statement

    B

    in the FROM clause of a SELECT statement

    C

    in the GROUP BY clause of a SELECT statement

    D

    in the WHERE clause of a SELECT statement

    E

    in the SET clause of an UPDATE statement

    F

    in the VALUES clause of an INSERT statement


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

  • 第12题:

    多选题
    Which two statements are true regarding the ORDER BY clause? ()
    A

    It is executed first in the query execution

    B

    It must be the last clause in the SELECT statement

    C

    It cannot be used in a SELECT statement containing a HAVING clause

    D

    You cannot specify a column name followed by an expression in this clause

    E

    You can specify a combination of numeric positions and column names in this clause


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

  • 第13题:

    In which of the following situations should correlation names be used?()

    • A、A table referenced in the FROM clause has no indexed column.
    • B、The table referenced in the FROM clause has more than 200 columns.
    • C、Two or more tables in the FROM clause have identical column names.
    • D、The FROM clause contains two or more tables in the SELECT statement.

    正确答案:C

  • 第14题:

    In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed in the SELECT statement?()

    • A、Immediately after the SELECT clause
    • B、Before the WHERE clause
    • C、Before the FROM clause
    • D、After the ORDER BY clause
    • E、After the WHERE clause

    正确答案:E

  • 第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题:

    In which four clauses can a subquery be used? ()

    • A、in the INTO clause of an INSERT statement
    • B、in the FROM clause of a SELECT statement
    • C、in the GROUP BY clause of a SELECT statement
    • D、in the WHERE clause of a SELECT statement
    • E、in the SET clause of an UPDATE statement
    • F、in the VALUES clause of an INSERT statement

    正确答案:B,D,E,F

  • 第17题:

    Click the Exhibit button and examine the data in the EMPLOYEES table. Which three subqueries work?()

    • A、SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id);
    • B、SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY department_id);
    • C、SELECT distinct department_id FROM employees WHERE salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);
    • D、SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);
    • E、SELECT last_name FROM employees WHERE salary > ANY (SELECT MAX(salary) FROM employees GROUP BY department_id);
    • F、SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));

    正确答案:C,D,E

  • 第18题:

    Where can subqueries be used?()

    • A、field names in the SELECT statement 
    • B、the FROM clause in the SELECT statement 
    • C、the HAVING clause in the SELECT statement
    • D、the GROUP BY clause in the SELECT statement 
    • E、the WHERE clause in only the SELECT statement 
    • F、the WHERE clause in SELECT as well as all DML statements

    正确答案:B,C,F

  • 第19题:

    多选题
    Which two statements are true regarding subqueries? ()
    A

    A subquery can retrieve zero or more rows

    B

    Only two subqueries can be placed atone level

    C

    A subquery can be used only in SQL query statements

    D

    A subquery can appear on either side of a comparison operator

    E

    There is no limit on the number of subquery levels in the WHERE clause of a SELECT statement


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

  • 第20题:

    多选题
    Evaluate this SQL statement: SELECT e.emp_name, d.dept_name FROM employees e JOIN departments d USING (department_id) WHERE d.department_id NOT IN (10,40) ORSER BY dept_name; The statement fails when executed. Which change fixes the error?()
    A

    remove the ORDER BY clause

    B

    remove the table alias prefix from the WHERE clause

    C

    remove the table alias from the SELECT clause

    D

    prefix the column in the USING clause with the table alias

    E

    prefix the column in the ORDER BY clause with the table alias

    F

    replace the condition d.department_id NOT IN (10,40) in the WHERE clause with d.department_id <> 10 AND d.department_id <> 40


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

  • 第21题:

    多选题
    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 parameters 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.


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

  • 第22题:

    多选题
    Which two statements are true about WHERE and HAVING clauses? ()
    A

    A WHERE clause can be used to restrict both rows and groups.

    B

    A WHERE clause can be used to restrict rows only.

    C

    A HAVING clause can be used to restrict both rows and groups.

    D

    A HAVING clause can be used to restrict groups only.

    E

    A WHERE clause CANNOT be used in a query of the query uses a HAVING clause.

    F

    A HAVING clause CANNOT be used in subqueries.


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

  • 第23题:

    多选题
    Where can subqueries be used?()
    A

    field names in the SELECT statement

    B

    the FROM clause in the SELECT statement

    C

    the HAVING clause in the SELECT statement

    D

    the GROUP BY clause in the SELECT statement

    E

    the WHERE clause in only the SELECT statement

    F

    the WHERE clause in SELECT as well as all DML statements


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

  • 第24题:

    单选题
    Exhibit: Examine the data in the EMPLOYEES table. Examine the subquery: SELECT last_name FROM employees WHERE salary IN (SELECT MAX(salary) FROM employees GROUP BY department_id); Which statement is true?()
    A

    The SELECT statement is syntactically accurate.

    B

    The SELECT statement does not work because there is no HAVING clause.

    C

    The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.

    D

    The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


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