In SQL, which statement is used to select employee number (EMPNO) and Department(DEPT) from (EMPL) table whose salary (SALARY) is 8000?
A. SELECT EMPNO, DEPT FROM EMPL=8000;
B. SELECT EMPNO, DEPT FROM EMPL WHERE SALARY=8000;
C. SELECT EMPNO, DEPT, SALARY =8000 FROM EMPL;
D. SELECT EMPNO, DEPT, FROM TABLE EMPL WHENSALARY=8000;
Answer:B
In SQL, which statement is used to select employee number (EMPNO) and Department(DEPT) from (EMPL) table whose salary (SALARY) is 8000?
A. SELECT EMPNO, DEPT FROM EMPL=8000; B. SELECT EMPNO, DEPT FROM EMPL WHERE SALARY=8000; C. SELECT EMPNO, DEPT, SALARY =8000 FROM EMPL; D. SELECT EMPNO, DEPT, FROM TABLE EMPL WHENSALARY=8000;