niusouti.com

单选题A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement

题目
单选题
A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement to meet thisrequirement?()
A

Sequence

B

Table Function

C

Identity Column

D

INSTEAD OF Trigger


相似考题
更多“单选题A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement ”相关问题
  • 第1题:

    A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement to meet thisrequirement?()

    • A、Sequence
    • B、Table Function
    • C、Identity Column
    • D、INSTEAD OF Trigger

    正确答案:A

  • 第2题:

    On Jan 11, 2005 at 2:30 P.M., an erroneous update operation modified all the values of column LASTNAME in the EMPLOYEE table in the Scott schema to an empty string. You are the system administrator, and you want to return the original values in the table. To do so, you decided to flash back the table. Which two options can you use to flash back a table?()

    • A、 by using Oracle Enterprise Manager
    • B、 by issuing the FLASHBACK TABLE statement at the RMAN prompt
    • C、 by issuing the FLASHBACK TABLE statement at the SQL prompt
    • D、 by issuing the FLASHBACK TABLE statement at the LSNRCTL prompt

    正确答案:A,C

  • 第3题:

    Which three statements inserts a row into the table?()

    • A、INSERT INTO employees   VALUES ( NULL, ‘John’,‘Smith’);
    • B、INSERT INTO employees( first_name, last_name)   VALUES(‘John’,‘Smith’);
    • C、INSERT INTO employees   VALUES (‘1000’,‘John’,NULL);
    • D、INSERT INTO employees(first_name,last_name, employee_id)   VALUES ( 1000, ‘John’,‘Smith’);
    • E、INSERT INTO employees (employee_id)   VALUES (1000);
    • F、INSERT INTO employees (employee_id, first_name, last_name)   VALUES ( 1000, ‘John’,‘’);

    正确答案:C,E,F

  • 第4题:

    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

  • 第5题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) SAL NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You want to create a SQL script file that contains an INSERT statement. When the script is run, the INSERT statement should insert a row with the specified values into the EMPLOYEES table. The INSERT statement should pass values to the table columns as specified below: EMPLOYEE_ID: Next value from the sequence EMP_ID_SEQ EMP_NAME and JOB_ID: As specified by the user during run time, throughsubstitution variables SAL: 2000 MGR_ID: No value DEPARTMENT_ID: Supplied by the user during run time through substitution variable. The INSERT statement should fail if the user supplies a value other than 20 or 50. Which INSERT statement meets the above requirements?()

    • A、INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
    • B、INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did IN (20,50));
    • C、INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50)) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
    • D、INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50) WITH CHECK OPTION) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
    • E、INSERT INTO (SELECT * FROM employees WHERE (department_id = 20 AND department_id = 50) WITH CHECK OPTION ) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);

    正确答案:D

  • 第6题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2(30) JOB_ID NUMBER SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You created a sequence called EMP_ID_SEQ in order to populate sequential values for the EMPLOYEE_ID column of the EMPLOYEES table. Which two statements regarding the EMP_ID_SEQ sequence are true? ()

    • A、You cannot use the EMP_ID_SEQ sequence to populate the JOB_ID column.
    • B、The EMP_ID_SEQ sequence is invalidated when you modify the EMPLOYEE_ID column.
    • C、The EMP_ID_SEQ sequence is not affected by modifications to the EMPLOYEES table.
    • D、Any other column of NUMBER data type in your schema can use the EMP_ID_SEQ sequence.
    • E、The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEES table.
    • F、The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEE_ID column.

    正确答案:C,D

  • 第7题:

    You are responsible for managing the database schema for an order entry application in a SQL Server 2005 database. After a design review, a member of the development staff asks you to add a new column named CommissionRate to the Product table. Because the actual commission rates for all products are not known at this time, each product has a default commission rate of 12 percent. The rate can be modified as necessary. You add the new column. You need to configure the table to assign the default value as efficiently as possible. What should you do?()

    • A、Create an INSERT trigger to assign the default value to each item in the table.
    • B、Create a CHECK constraint to validate the data and to assign the default value to each item in the table.
    • C、Create an UPDATE trigger to update the default value for each new item in the table.
    • D、Create a DEFAULT constraint to assign the default value specifying the WITH VALUES argument.

    正确答案:D

  • 第8题:

    单选题
    Examine the data in the EMPLOYEES table. EMPLOYEES EMP_NAME DEPT_ID MGR_ID JOB_ID SALARY EMPLOYEE_ID 101 Smith 20 120 SA_REP 4000 102 Martin 10 105 CLERK 2500 103 Chris 20 120 IT_ADMIN 4200 104 John 30 108 HR_CLERK 2500 105 Diana 30 108 IT_ADMIN 5000 106 Smith 40 110 AD.ASST 3000 108 Jennifer 30 110 HR_DIR 6500 110 Bob 40 EK_DIR 8000 120 Revi 20 110 SA_DIR 6500 On the EMPLOYEES table, EMPLOYEE_ID is the primary key. MGR_ID is the ID of managers and refers to the EMPLOYEE_ID. The JOB_ID column is a NOT NULL column. Evaluate this DELETE statement: DELETE employee_id, salary, job_id FROM employees WHERE dept_id = 90; Why does the DELETE statement fail when you execute it?()
    A

    There is no row with dept_id 90 in the EMPLOYEES table.

    B

    You cannot delete the JOB_ID column because it is a NOT NULL column.

    C

    You cannot specify column names in the DELETE clause of the DELETE statement.

    D

    You cannot delete the EMPLOYEE_ID column because it is the primary key of the table.


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

  • 第9题:

    单选题
    For an inventory report, you created a work_in_progress that contains two columns, ID_number and quantity. The parent group of the work_in_progress is in_inventory which contains one column, dept_no. You added a filter of fist fifteen to total_inventory and a filter of last 20 for work_in_progress. Which records will the report return?()
    A

    First 15 dept_no values. 

    B

    Last 20 ID_no and quantity values with the first 15 dept_no values for each work_in_progress value. 

    C

    First 15 dept_no values with the last 20 ID_number and quantity values for each total_inventory value. 

    D

    First 15 dept_no values and the last 20 ID_no and quantity values. 

    E

    The last 20 ID_number and quantity values.


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

  • 第10题:

    单选题
    You created a report from the human resources department based on all the columns in the EMP table. After viewing the report users requested that the cmp_ID columns peers first in the output. How would you change the position of the column?()
    A

    After the query. 

    B

    Enter the report and change the column's position in the field tab. 

    C

    Alter the column's position in the object navigator. 

    D

    Enter the report wizard and change the column's position in the data tab. 

    E

    Alter the column's position within its group and change the layout. 


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

  • 第11题:

    单选题
    You are responsible for managing the database schema for an order entry application in a SQL Server 2005 database. After a design review, a member of the development staff asks you to add a new column named CommissionRate to the Product table. Because the actual commission rates for all products are not known at this time, each product has a default commission rate of 12 percent. The rate can be modified as necessary. You add the new column. You need to configure the table to assign the default value as efficiently as possible. What should you do?()
    A

    Create an INSERT trigger to assign the default value to each item in the table.

    B

    Create a CHECK constraint to validate the data and to assign the default value to each item in the table.

    C

    Create an UPDATE trigger to update the default value for each new item in the table.

    D

    Create a DEFAULT constraint to assign the default value specifying the WITH VALUES argument.


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

  • 第12题:

    单选题
    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
    解析: 暂无解析

  • 第13题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements inserts a row into the table? ()

    • A、INSERT INTO employees VALUES (NULL, 'JOHN','Smith');
    • B、INSERT INTO employees( first_name, last_name) VALUES ('JOHN','Smith');
    • C、INSERT INTO employees VALUES ('1000','JOHN','NULL');
    • D、INSERT INTO employees(first_name,last_name, employee_id) VALUES ('1000, 'john','Smith');
    • E、INSERT INTO employees (employee_id) VALUES (1000);
    • F、INSERT INTO employees (employee_id, first_name, last_name) VALUES ( 1000, 'john',");

    正确答案:C,E,F

  • 第14题:

    The details of the order ID, order date, order total, and customer ID are obtained from the ORDERS table. If the order value is more than 30000, the details have to be added to the LARGEjDRDERS table. The order ID, order date, and order total should be added to the ORDERJHISTORY table, and order ID and customer ID should be added to the CUSTJHISTORY table.   Which multitable INSERT statement would you use? ()

    • A、 Pivoting INSERT
    • B、 Unconditional INSERT
    • C、 Conditional ALL INSERT
    • D、 Conditional FIRST INSERT

    正确答案:C

  • 第15题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2(30) JOB_ID NUMBER/ SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You created a sequence called EMP_ID_SEQ in orderto populate sequential values for the EMPLOYEE_ID column of the EMPLOYEES table. Which two statements regarding the EMP_ID_SEQ sequence are true? ()

    • A、You cannot use the EMP_ID_SEQ sequence to populate the JOB_ID column.
    • B、The EMP_ID_SEQ sequence is invalidated when you modify the EMPLOYEE_ID column.
    • C、The EMP_ID_SEQ sequence is not affected by modifications to the EMPLOYEES table.
    • D、Any other column of NUMBER data type in your schema can use the EMP_ID_SEQ sequence.
    • E、The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEES table.
    • F、The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEE_ID column.

    正确答案:C,D

  • 第16题:

    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements insert a row into the table? ()

    • A、INSERT INTO employees VALUES (NULL, 'John', 'smith');
    • B、INSERT INTO employees (first_name, last_name) VALUES ('John', 'smith');
    • C、INSERT INTO employees VALUES ('1000, 'John', 'smith');
    • D、INSERT INTO employees (first_name, last_name, employee_id) VALUES (1000, 'John', 'smith');
    • E、INSERT INTO employees (employee_id) VALUES (1000);
    • F、INSERT INTO employees ( employee_id, first_name, last_name, ) VALUES (1000, 'John','');

    正确答案:C,E,F

  • 第17题:

    You created a report from the human resources department based on all the columns in the EMP table. After viewing the report users requested that the cmp_ID columns peers first in the output. How would you change the position of the column?()

    • A、After the query. 
    • B、Enter the report and change the column's position in the field tab. 
    • C、Alter the column's position in the object navigator. 
    • D、Enter the report wizard and change the column's position in the data tab. 
    • E、Alter the column's position within its group and change the layout. 

    正确答案:B

  • 第18题:

    You are responsible for managing the database schema for an order entry application in a SQL Server 2005 database. After a design review, a member of the development staff asks you to add a new column named CommissionRate to the Product table. Because the actual commission rates for all products are not known at this time, each product has a default commission rate of 12 percent. The rate can be modified as necessary. You add the new column. You need to configure the table to assign the default value as efficiently as possible. What should you do?()

    • A、 Create an INSERT trigger to assign the default value to each item in the table. 
    • B、 Create a CHECK constraint to validate the data and to assign the default value to each item in the table. 
    • C、 Create an UPDATE trigger to update the default value for each new item in the table. 
    • D、 Create a DEFAULT constraint to assign the default value specifying the WITH VALUES argument.

    正确答案:D

  • 第19题:

    单选题
    A programmer wants to generate values for a numeric ID column in their EXPENSE table. The ID column values need to be incremented by 1000 for each new expense report added to the EXPENSE table. Which DB2 object can be referenced by an INSERT statement to meet thisrequirement?()
    A

    Sequence

    B

    Table Function

    C

    Identity Column

    D

    INSTEAD OF Trigger


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

  • 第20题:

    单选题
    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) SAL NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You want to create a SQL script file that contains an INSERT statement. When the script is run, the INSERT statement should insert a row with the specified values into the EMPLOYEES table. The INSERT statement should pass values to the table columns as specified below: EMPLOYEE_ID: Next value from the sequence EMP_ID_SEQEMP_NAME and JOB_ID: As specified by the user during run time, through substitution variables SAL: 2000 MGR_ID: No value DEPARTMENT_ID: Supplied by the user during run time through substitution variable. The INSERT statement should fail if the user supplies a value other than 20 or 50. Which INSERT statement meets the above requirements?()
    A

    INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);

    B

    INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did IN (20,50));

    C

    INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50)) VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);

    D

    INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50) WITH CHECK OPTION) VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);

    E

    INSERT INTO (SELECT * FROM employees WHERE (department_id = 20 AND department_id = 50) WITH CHECK OPTION ) VALUES (emp_id_seq.NEXTVAL, &ename','&jobid', 2000, NULL, &did);


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

  • 第21题:

    多选题
    On Jan 11, 2005 at 2:30 P.M., an erroneous update operation modified all the values of column LASTNAME in the EMPLOYEE table in the Scott schema to an empty string. You are the system administrator, and you want to return the original values in the table. To do so, you decided to flash back the table. Which two options can you use to flash back a table?()
    A

    by using Oracle Enterprise Manager

    B

    by issuing the FLASHBACK TABLE statement at the RMAN prompt

    C

    by issuing the FLASHBACK TABLE statement at the SQL prompt

    D

    by issuing the FLASHBACK TABLE statement at the LSNRCTL prompt


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

  • 第22题:

    多选题
    Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL, Primary Key EMP_NAME VARCHAR2(30) JOB_ID NUMBER SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table You created a sequence called EMP_ID_SEQ in order to populate sequential values for the EMPLOYEE_ID column of the EMPLOYEES table. Which two statements regarding the EMP_ID_SEQ sequence are true? ()
    A

    You cannot use the EMP_ID_SEQ sequence to populate the JOB_ID column.

    B

    The EMP_ID_SEQ sequence is invalidated when you modify the EMPLOYEE_ID column.

    C

    The EMP_ID_SEQ sequence is not affected by modifications to the EMPLOYEES table.

    D

    Any other column of NUMBER data type in your schema can use the EMP_ID_SEQ sequence.

    E

    The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEES table.

    F

    The EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEE_ID column.


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

  • 第23题:

    单选题
    You are responsible for managing the database schema for an order entry application in a SQL Server 2005 database. After a design review, a member of the development staff asks you to add a new column named CommissionRate to the Product table. Because the actual commission rates for all products are not known at this time, each product has a default commission rate of 12 percent. The rate can be modified as necessary. You add the new column. You need to configure the table to assign the default value as efficiently as possible. What should you do?()
    A

     Create an INSERT trigger to assign the default value to each item in the table. 

    B

     Create a CHECK constraint to validate the data and to assign the default value to each item in the table. 

    C

     Create an UPDATE trigger to update the default value for each new item in the table. 

    D

     Create a DEFAULT constraint to assign the default value specifying the WITH VALUES argument.


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

  • 第24题:

    单选题
    The details of the order ID, order date, order total, and customer ID are obtained from the ORDERS table. If the order value is more than 30000, the details have to be added to the LARGEjDRDERS table. The order ID, order date, and order total should be added to the ORDERJHISTORY table, and order ID and customer ID should be added to the CUSTJHISTORY table.   Which multitable INSERT statement would you use? ()
    A

     Pivoting INSERT

    B

     Unconditional INSERT

    C

     Conditional ALL INSERT

    D

     Conditional FIRST INSERT


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