Examine the data from the EMP table:EMP_ID DEPT_ID COMMISSION1 10 5002 20 10003 104 10 6005 30 8006 30 2007 108 20 300The COMMISSION column shows the monthly commission earned by the employee. Which three tasks would require subqueries or joins in order t

题目

Examine the data from the EMP table:EMP_ID DEPT_ID COMMISSION1 10 5002 20 10003 104 10 6005 30 8006 30 2007 108 20 300The COMMISSION column shows the monthly commission earned by the employee. Which three tasks would require subqueries or joins in order to perform in a single step? ()

A. Deleting the records of employees who do not earn commission.

B. Increasing the commission of employee 3 by the average commission earned in department 20.

C. Finding the number of employees who do NOT earn commission and are working for department 20.

D. Inserting into the table a new employee 10 who works for department 20 and earns a commission that is equal to the commission earned by employee 3.

E. Creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and COMMISSIONS of the EMP table.

F. Decreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more then 800.


相似考题
参考答案和解析
参考答案:B, D, E
更多“Examine the data from the EMP table:EMP_ID DEPT_ID COMMISSION1 10 5002 20 10003 104 10 600 ”相关问题
  • 第1题:

    ViewtheExhibitandexaminethestructureoftheEMPtable.YouexecutedthefollowingcommandtoaddaprimarykeytotheEMPtable:ALTERTABLEempADDCONSTRAINTemp_id_pkPRIMARYKEY(emp_id)USINGINDEXemp_id_idx;Whichstatementistrueregardingtheeffectofthecommand?()

    A.ThePRIMARYKEYiscreatedalongwithanewindex.

    B.ThePRIMARYKEYiscreatedanditwoulduseanexistinguniqueindex.

    C.ThePRIMARYKEYwouldbecreatedinadisabledstatebecauseitisusinganexistingindex.

    D.ThestatementproducesanerrorbecausetheUSINGclauseispermittedonlyintheCREATETABLEcommand.


    参考答案:B

  • 第2题:

    有以下程序 struct s {int x,y;}data[2]={10,100,20,200}; main() { struct s*p=data; printf("%d\n",++(p->x)); } 程序运行后的输出结果是

    A.10

    B.11

    C.20

    D.21


    正确答案:B
    解析:本题中定义了一个结构体数组data[2]并初始化,主函数中定义了一个结构体类型指针变量并让它指向data的首地址,由于p指向第一个元素的地址,所以p ->x相当于data[0].x即为10,所以++(p->x)后的值为11。

  • 第3题:

    有以下程序 struct s { int x,y; } data[2]={10,100,20,200}; main() struct s *p=data; printf("%d\n",++(p->x)); 程序运行后的输出结果是

    A.10

    B.11

    C.20

    D.21


    正确答案:B
    解析:本题中定义了一个结构体数组data[2]并初始化,主函数中定义了一个结构体类型指针变量并让它指向data的首地址,由于p指向第一个元素的地址,所以p->x相当于data[0].x即为10,所以++(p->x)后的值为11.所以,4个选项中选项B符合题意。

  • 第4题:

    有以下程序}

    struct s

    { int x,y; } data[2]={10,100,20,200};}

    main( )}

    { struct s *p=data;}

    printf("%d\n",++(p->x));}

    程序运行后的输出结果是

    A.10

    B.11

    C.20

    D.21


    正确答案:B
    解析:data数组中共有两个元素,指针变量p所指的单元为数组的第一个存储单元,该单元中存储了数组中的第一个元素。故p->x值为10,++(p->x)值为11。

  • 第5题:

    有以下程序: struct s { int x,y;) data[2]={10,100,20,200); main() { struct s *p=data; printf("%d\n",++(p->x)); } 程序运行后的输出结果是( )。

    A.10

    B.11

    C.20

    D.21


    正确答案:B
    解析:本题中定义了一个结构体数组data[2]并初始化,主函数中定义了一个结构体类型指针变量并让它指向data的首地址,由于p指向第一个元素的地址,所以p->x相当于data[0].x即为10,所以++(p->x)后的值为11。故4个选项中选项B符合题意。

  • 第6题:

    在检查触电病人呼吸时,应按照()方式默数5-10秒。

    A.1、2、3、4、5

    B.101、102、103、104、105

    C.1001、1002、1003、1004、1005

    D.10002、10003、10004、10005


    1001、1002、1003、1004、1005