位置:首页 > 题库频道 > 其它分类 > 计算机其它 > 专业技术初级资格程序员基础知识DB2

Which statement about system-period temporal tables is true、

发布时间:2024-07-09

A.They store user-based period information.

B.They do not have a separate history table.

C.They can be queried without a time period specification.

D.They manage data based on time criteria specified by users or applications.

试卷相关题目

  • 1Which SQL statement will retrieve the department number (WORKDEPT) and average departmentalsalary (SALARY) for all departments in a table named EMPLOYEE and arrange the result set inascending order by average departmental salary、

    A.SELECT workdept, AVG(salary) FROM employee ORDER BY workdept GROUP BY 2

    B.SELECT workdept, AVG(salary) FROM employee ORDER BY workdept ARRANGE BY 2

    C.SELECT workdept, AVERAGE(salary) FROM employee GROUP BY workdept ORDER BY 2

    D.SELECT workdept, AVG(salary) FROM employee GROUP BY workdept ORDER BY 2

    开始考试点击查看答案
  • 2Which type of stored procedure is not associated with an external application program、

    A.A Java stored procedure.

    B.A REXX stored procedure.

    C.A native SQL stored procedure.

    D.An external SQL stored procedur

    开始考试点击查看答案
  • 3An SQL function named DEPT_INFO was created as follows:  CREATE FUNCTION dept_info()  RETURNS TABLE(dept_id INTEGER,dept_name VARCHAR(20))  LANGUAGE SQL  READS SQL DATA  BEGIN ATOMIC  RETURN    SELECT deptno,deptname FROM department WHERE deptname LIKE 'S%';  END What is the correct way to use this function in a query、

    A.SELECT dept_info(dept_id, dept_name)

    B.SELECT dept_id, dept_name FROM dept_info()

    C.SELECT TABLE dept_id, dept_name FROM dept_info()

    D.SELECT dept_id, dept_name FROM TABLE(dept_info()) AS results

    开始考试点击查看答案
  • 4If a table named MY_TAB contains 100 rows and the following statement is executed:  UPDATE  (SELECT * FROM my_tab   ORDER BY col1 DESC   FETCH FIRST 10 ROWS ONLY) AS temp   SET col3 = 99; How many rows will be updated、

    A.0

    B.1

    C.10

    D.99

    开始考试点击查看答案
  • 5Which SQL statement should be used to retrieve the minimum and maximum salaries (SALARY) for each job code (JOB), sorted by job code, from a table named EMPLOYEE、

    A.SELECT job, MIN(salary), MAX(salary) FROM employee GROUP BY job ORDER BY job;

    B.SELECT job, MIN(salary), MAX(salary) FROM employee ORDER BY job;

    C.SELECT job, MIN(salary), MAX(salary) FROM employee GROUP BY SALARY ORDER BY job;

    D.SELECT job, MIN(salary), MAX(salary) FROM employee GROUP BY MIN(salary), MAX(salary)ORDER BY job;

    开始考试点击查看答案
  • 6A table named DEPARTMENT contains the following data:  DEPTNO     DEPTNAME          MGRNO      ADMRDEPT -----      --------          -----      -------- A01        PLANNING          000020     A00 B02        BRANCH OFFICE 1   -          E01 C22        BRANCH OFFICE 2   -          E01 D22        BRANCH OFFICE 3   -          E01 E22        BRANCH OFFICE 4   -          E01 If a user attempts to execute the following statement UPDATE employee SET workdept=   (SELECT deptno FROM department WHERE admrdept LIKE 'E%') WHERE workdept IS NULL; What will happen、

    A.The statement will fail because a subquery cannot be used in an UPDATE statement.

    B.The statement will fail because the result set produced by the subquery will contain more than one row.

    C.The statement will succeed; the last record retrieved by the subquery will be used to provide a WORKDEPT value for the update operation.

    D.The statement will succeed; the first record retrieved by the subquery will be used to provide a WORKDEPT value for the update operation.

    开始考试点击查看答案
  • 7Which statement about UPDATE processing is FALSE、

    A.The UPDATE statement logs the before and after value of every column it modifies.

    B.A searched UPDATE is used to update one or more rows and a positioned UPDATE is used to update exactly one row.

    C.When the UPDATE statement modifies parent key columns, the value of corresponding foreign key columns are also modifie

    D.D. The UPDATE statement modifies the values of specified columns in the rows of a table, view, or underlying table(s) of a specified fullselect.

    开始考试点击查看答案
  • 8Given the following statements:  CREATE TABLE employee(empid INTEGER,info XML); INSERT INTO employee VALUES(1, '<employeesinfo>    <name>Joe Smith</name>    <department name="DB2">     <team>Development</team>    </department>  </employeeinfo>'); If the following XQuery statement is executed:  XQUERY  for $info in deb2-fn:xmlcolumn('EMPLOYEE.INFO')/employeeinfo  return $info/name What will be the result、

    A.Joe Smith

    B.Joe Smith

    C.Joe Smith>DB2

    D.Joe Smith

    开始考试点击查看答案
  • 9A table named STATES has the following columns: STATE_CD, REGION_CD, and STATE_NAME.Which SQL statement will return the number of states in each region, ordered by number of states、

    A.SELECT state_cd, COUNT(*) FROM states ORDER BY COUNT(*);

    B.SELECT state_cd, COUNT(*) FROM states GROUP BY state_cd ORDER BY state_cd;

    C.SELECT region_cd, COUNT(*) FROM states GROUP BY state_cd ORDER BY COUNT(*);

    D.SELECT region_cd, COUNT(*) FROM states GROUP BY region_cd ORDER BY COUNT(*);

    开始考试点击查看答案
  • 10When a user-defined function (UDF) is created and no schema is specified, what schema is used to store the UDF、

    A.The SYSIBM schema.

    B.The SYSFUN schema.

    C.A schema with the name of the UDF.

    D.A schema with the userid of the UDF definer.

    开始考试点击查看答案
返回顶部