网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

Which SELECT statement should you use to extract the year from the system date and display it in the format "1998"?()

  • A、SELECT TO_CHAR(SYSDATE,'yyyy') FROM dual;
  • B、SELECT TO_DATE(SYSDATE,'yyyy') FROM dual;
  • C、SELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual;
  • D、SELECT DECODE(SUBSTR(SYSDATE, 8), 'year') FROM dual;
  • E、SELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),'yyyy') FROM dual;

参考答案

更多 “Which SELECT statement should you use to extract the year from the system date and display it in the format "1998"?()A、SELECT TO_CHAR(SYSDATE,'yyyy') FROM dual;B、SELECT TO_DATE(SYSDATE,'yyyy') FROM dual;C、SELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual;D、SELECT DECODE(SUBSTR(SYSDATE, 8), 'year') FROM dual;E、SELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),'yyyy') FROM dual;” 相关考题
考题 In which four clauses can a subquery be used? () A. in the INTO clause of an INSERT statementB. in the FROM clause of a SELECT statementC. in the GROUP BY clause of a SELECT statementD. in the WHERE clause of a SELECT statementE. in the SET clause of an UPDATE statementF. in the VALUES clause of an INSERT statement

考题 The user Sue issues this SQL statement:GRANT SELECT ON sue. EMP TO alice WITH GRANT OPTION; The user Alice issues this SQL statement:GRANT SELECT ON sue. EMP TO reena WITH GRANT OPTION; The user Reena issues this SQL statement:GRANT SELECT ON sue. EMP TO timber;The user Sue issues this SQL statement:REVOKE select on sue. EMP FROM alice;For which users does the revoke command revoke SELECT privileges on the SUE.EMP table?()A. Alice onlyB. Alice and ReenaC. Alice, Reena, and TimberD. Sue, Alice, Reena, and Timber

考题 Evaluate this SQL statement:In the statement, which capabilities of a SELECT statement are performed?() A. Selection, projection, joinB. Difference, projection, joinC. Selection, intersection, joinD. Intersection, projection, joinE. Difference, projection, product

考题 Exhibit:Examine the data in the EMPLOYEES table.Examine the subquery:SELECT last_nameFROM employeesWHERE salary IN (SELECT MAX(salary)FROM employeesGROUP 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.

考题 The EMP table contains these columns:You need to display the employees who have not been assigned to any department.You write the SELECT statement:What is true about this SQL statement?() A. The SQL statement displays the desired results.B. The column in the WHERE clause should be changed to display the desired results.C. The operator in the WHERE clause should be changed to display the desired results.D. The WHERE clause should be changed to use an outer join to display the desired results.

考题 Evaluate this SQL statement:SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAMEFROM EMPLOYEES e, DEPARTMENTS dWHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID;In the statement, which capabilities of a SELECT statement are performed?()A.selection, projection, joinB.difference, projection, joinC.selection, intersection, joinD.intersection, projection, joinE.difference, projection, product

考题 Click the Exhibit button and examine the data in the EMPLOYEES table.Examine the subquery:SELECT last_nameFROM employeesWHERE salary IN (SELECT MAX(salary)FROM employeesGROUP 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.

考题 What is a sub-select statement?A.a select statement that selects a subset of fields in a tableB.a select statement that returns a subset of the data in a tableC.a select statement that appears within another select statementD.a select statement that returns a subset of the constraints on a field

考题 In which four clauses can a subquery be used?()A、in the INTO clause of an INSERT statementB、in the FROM clause of a SELECT statementC、in the GROUP BY clause of a SELECT statementD、in the WHERE clause of a SELECT statementE、in the SET clause of an UPDATE statementF、in the VALUES clause of an INSERT statement

考题 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.

考题 You would like to display the system date in the format "Monday, 01 June, 2001". Which SELECT statement should you use? ()A、SELECT TO_DATE(SYSDATE, 'FMDAY, DD Month, YYYY') FROM dual;B、SELECT TO_CHAR(SYSDATE, 'FMDD, DY Month, 'YYYY') FROM dual;C、SELECT TO_CHAR(SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;D、SELECT TO_CHAR(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;E、SELECT TO_DATE(SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual;

考题 Which SQL statement returns a numeric value?()A、SELECT ADD_MONTHS(MAX(hire_Date), 6) FROM EMP;B、SELECT ROUND(hire_date) FROM EMP;C、SELECT sysdate-hire_date FROM EMP;D、SELECT TO_NUMBER(hire_date + 7) FROM EMP;

考题 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.

考题 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 clauseD、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

考题 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 statementD、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

考题 Which two statements about subqueries are true? ()A、A subquery should retrieve only one row.B、A subquery can retrieve zero or more rows.C、A subquery can be used only in SQL query statements.D、Subqueries CANNOT be nested by more than two levels.E、A subquery CANNOT be used in an SQL query statement that uses group functions.F、When a subquery is used with an inequality comparison operator in the outer SQL statement, the column list in the SELECT clause of the subquery should contain only one column.

考题 You are a database administrator for your company. You are responsible for a SQL Server 2005 database that has several indexes. You need to write a stored procedure that checks the indexes for fragmentation. Which Transact-SQL statement should you use?()A、DBCC DBREINDEXB、SELECT * FROM sys.dm_db_index_physical_statsC、DBCC INDEXDEFRAGD、SELECT * FROM sys.indexes

考题 单选题Evaluate this SQL statement: SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAME FROM EMP e, DEPARTMENT d WHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID; In the statement, which capabilities of a SELECT statement are performed?()A Selection, projection, joinB Difference, projection, joinC Selection, intersection, joinD Intersection, projection, joinE Difference, projection, product

考题 单选题The user Sue issues this SQL statement: GRANT SELECT ON sue. EMP TO alice WITH GRANT OPTION; The user Alice issues this SQL statement: GRANT SELECT ON sue. EMP TO reena WITH GRANT OPTION; The user Reena issues this SQL statement: GRANT SELECT ON sue. EMP TO timber; The user Sue issues this SQL statement: REVOKE select on sue. EMP FROM alice; For which users does the revoke command revoke SELECT privileges on the SUE.EMP table?()A Alice onlyB Alice and ReenaC Alice, Reena, and TimberD Sue, Alice, Reena, and Timber

考题 单选题View the Exhibit and examine the structure of the ORDERS and ORDERJTEMS tables.  Evaluate the following SQL statement:   SELECT oi.order_id, product_jd, order_date   FROM order_items oi JOIN orders o   USING (order_id);   Which statement is true regarding the execution of this SQL statement?()A  The statement would not execute because table aliases are not allowed in the JOIN clause.B  The statement would not execute because the table alias prefix is not used in the USING clause.C  The statement would not execute because all the columns in the SELECT clause are not prefixed with table aliases.D  The statement would not execute because the column part of the USING clause cannot have a qualifier in the SELECT list.

考题 单选题You need to give the MANAGER role the ability to select from, insert into, and modify existing rows in the STUDENT_GRADES table. Anyone given this MANAGER role should be able to pass those privileges on to others.Which statement accomplishes this?()A GRANT select, insert, update ON student_grades TO managerB GRANT select, insert, update ON student_grades TO ROLE managerC GRANT select, insert, modify ON student_grades TO manager WITH GRANT OPTION;D GRANT select, insert, update ON student_grades TO manager WITH GRANT OPTION;E GRANT select, insert, update ON student_grades TO ROLE manager WITH GRANT OPTION;F GRANT select, insert, modify ON student_grades TO ROLE manager WITH GRANT OPTION;

考题 单选题Evaluate this SQL statement: SELECT e.EMPLOYEE_ID,e.LAST_NAME,e.DEPARTMENT_ID, d.DEPARTMENT_NAME FROM EMP e, DEPARTMENT d WHERE e.DEPARTMENT_ID = d.DEPARTMENT_ID; In the statement, which capabilities of a SELECT statement are performed?()A Selection, projection, joinB Difference, projection, joinC Selection, intersection, joinD Intersection, projection, joinE Difference, projection, product

考题 多选题Which two statements about views are true?()AA view can be created as read only.BA view can be created as a join on two or more tables.CA view cannot have an ORDER BY clause in the SELECT statement.DA view cannot be created with a GROUP BY clause in the SELECT statement.EA view must have aliases defined for the column names in the SELECT statement.

考题 多选题In which four clauses can a subquery be used? ()Ain the INTO clause of an INSERT statementBin the FROM clause of a SELECT statementCin the GROUP BY clause of a SELECT statementDin the WHERE clause of a SELECT statementEin the SET clause of an UPDATE statementFin the VALUES clause of an INSERT statement

考题 单选题The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this? ()A GRANT select ON dept TO ALL_ USER;B GRANT select ON dept TO ALL;C GRANT QUERY ON dept TO ALL_USERSD GRANT select ON dept TO PUBLIC;

考题 单选题The EMP table contains these columns: LAST NAME VARCHAR2(25) SALARY NUMBER(6,2) DEPARTMENT_ID NUMBER(6) You need to display the employees who have not been assigned to any department. You write the SELECT statement: SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP WHERE DEPARMENT_ID = NULL; What is true about this SQL statement?()A The SQL statement displays the desired results.B The column in the WHERE clause should be changed to display the desired results.C The operator in the WHERE clause should be changed to display the desired results.D The WHERE clause should be changed to use an outer join to display the desired results.

考题 多选题Which two statements about subqueries are true? ()AA subquery should retrieve only one row.BA subquery can retrieve zero or more rows.CA subquery can be used only in SQL query statements.DSubqueries CANNOT be nested by more than two levels.EA subquery CANNOT be used in an SQL query statement that uses group functions.FWhen a subquery is used with an inequality comparison operator in the outer SQL statement, the column list in the SELECT clause of the subquery should contain only one column.