设有职工基本表:EMP(ENO,ENAME,AGE,SEX,SALARY),其属性分别表示职工号、姓名、年龄、性别、工资。为每个工资低于1000元的女职工加薪200元,补充这个操作的SQL语句。UPDATE?EMP()
A: SET?SALARY=SALARY-200
B: SET?SALARY=SALARY+200
C: WHERE?SALARY>1000?AND?SEX=女;
D: WHERE?SALARY<1000?AND?SEX=女;
A: SET?SALARY=SALARY-200
B: SET?SALARY=SALARY+200
C: WHERE?SALARY>1000?AND?SEX=女;
D: WHERE?SALARY<1000?AND?SEX=女;
举一反三
- 设有职工基本表:EMP(ENO,ENAME,AGE,SEX,SALARY),其属性分别表示职工号、姓名、年龄、性别、工资。为每个工资低于平均工资的女职工加薪200元,以下SQL语句正确的是______。 A: UPDATE EMP SET SALARY=SALARY+200 B: WHERE SALAEY<(SELECT AVG(SALARY)FROM EMP) AND SEX=’女’ C: UPDATE FROM EMP SET SALARY=200 D: WHERE SALAEY<(SELECT SUM(SALARY)FROM EMP)AND SEX=’女’ E: UPDATE EMP SET SALARY=200 F: WHERE SALAEY<(SELECT AVG(SALARY)FROM EMP)AND SEX=’女’ G: UPDATE FROM EMP SET SALARY=SALARY+200 H: WHERE SALAEY<(SELECT SUM(SALARY)FROM EMP)AND SEX=’女’
- 设有职工基本表:EMP(ENO,ENAME,AGE,SEX,SALARY),其属性分别表示职工号、姓名、年龄、性别、工资。为每个工资低于平均工资的女职工加薪200元,以下SQL语句正确的是( )
- 如果对关系emp(eno,ename,salary)成功执行下面的SQL语句:CREATECLUSTERINDEXname_indexONemp(salary),其结果是()
- 以下语句错误的是() A: SELECTrank,AVG(salary)FROMpeopleGROUPBYrankHAVINGAVG(salary)>1000 B: SELECTrank,AVG(salary)FROMpeopleHAVINGAVG(salary)>1000GROUPBYrank; C: SELECTAVG(salary)FROMpeopleGROUPBYrankHAVINGAVG(salary)>1000; D: SELECTrank,AVG(salary)FROMpeopleGROUPBYrankWHEREAVG(salary)>1000;
- 以下语句错误的是() A: LECT rank, AVG(salary) FROM people HAVING AVG(salary) > 1000 GROUP BY rank; B: SELECT rank, AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000 C: SELECT rank, AVG(salary) FROM people HAVING AVG(salary) > 1000 GROUP BY rank; D: SELECT AVG(salary) FROM people GROUP BY rank HAVING AVG(salary) > 1000; E: SELECT rank, AVG(salary) FROM people GROUP BY rank WHERE AVG(salary) > 1000;