WebAug 23, 2024 · A) select * from emp where comm > sal; 12. List the emps in the asc order of Designations of those joined after the second half of 1981. A) select * from emp where hiredate > (’30-jun-81’) and to_char (hiredate,’YYYY’) = 1981 order by job asc; How to list all EMPs who joined before 1981? WebSep 29, 2013 · 5 Answers. select e.* from emp e inner join department d on e.id = d.order where d.name = 'testing' order by d.order asc. Where this would change your results is if …
MySQL-CRUD - 简书
WebAnswer: This is Co-related Subquery In short first emp (alias a) fires first then for each of the rows in emp a picks the inner query. For inner query first emp b is queried and all the … WebSep 30, 2013 · 5 Answers. select e.* from emp e inner join department d on e.id = d.order where d.name = 'testing' order by d.order asc. Where this would change your results is if there are multiple rows in department with the same order value matching one or more rows in emp - in which case this query will return multiple rows, whereas the original would not ... brew shop strathpine
Part - I SQL Interview Questions - Krishna Training
WebSQL > SELECT * FROM EMP ORDER BY Sal ASC ; Also Read: Best PL/SQL and SQL Tips To Read Before Interview 4. List the details of the emps in asc order of the Deptnos and desc of Jobs. SQL > SELECT * FROM EMP ORDER BY Deptno ASC, Job DESC ; Also Read: Sample Hadoop HBase Interview Questions and Answers 5. WebSELECT ename, sal=sal+1000 FROM emp; SELECT ename, sal+1000 FROM emp; SELECT ename, 1000 FROM emp; Answer: C. Basic arithmetic calculations can be done using the columns in SELECT statements. 8. Determine the output of the below query SELECT 36/2-5*10 FROM dual; 130 -32 -120 175 WebJul 23, 2024 · List the Emps whose Sal is > the maximum remuneration of the SALESMAN. %%sql select * from emp e where e.sal > (select max(f.sal+f.comm) from emp f where f.job like "salesman") * mysql+mysqldb://root:***@localhost:3306/oracle_emp 5 rows affected. 56. List the emps who are senior to BLAKE working at CHICAGO & BOSTON. county denver colorado