Which of the below queries displays employees' name and new salary after the increment of 1000? SELECT ename, sal FROM emp;SELECT ename, sal=sal+1000 FROM emp;SELECT ename, sal+1000 FROM emp;
Question
Which of the below queries displays employees' name and new salary after the increment of 1000? SELECT ename, sal FROM emp;SELECT ename, sal=sal+1000 FROM emp;SELECT ename, sal+1000 FROM emp;
Solution
The correct query to display employees' name and new salary after the increment of 1000 is:
SELECT ename, sal+1000 FROM emp;
This query will select the employee name (ename) and the current salary (sal) plus 1000 from the employee (emp) table. The other two queries are incorrect. The first one only selects the employee name and current salary without adding the increment. The second one tries to assign the incremented salary to the salary column, which is not the correct syntax for a SELECT statement.
Similar Questions
Which of the below queries displays employees' name and new salary after the increment of 1000
Consider a table Emp(Name, Salary)SELECT Name FROM Emp WHERE Salary BETWEEN 1000 AND 2000;The above query will display the names from the Emp table whose __________Salary is >1000 and Salary <= 2000Salary is >=1000 and Salary <= 2000Salary is >=1000 and Salary < 2000Salary is >1000 and Salary < 2000
Write queries for the following tables:T1 ( Empno, Ename , Salary, Designation)T2 (Empno, Deptno.)(1) Display the Deptno in which Employee Seeta is working.(2) Display Empno, Ename, Deptno.
employee_id Name Salary1001 Annie 60001009 Ross 45001018 Zeith 7000above are the Employee table details.select employee_id from employee order by employee_id desc;Which of the following output will be true?
Which of the following SQL statements can extract employee name’s whose salary is $10000 or higher from the table “human_resource”? SELECT employee_name, COUNT(*) FROM human_resourceWHERE salary>=10000 GROUP BY employee_nameSELECT employee_name FROM human_resourceWHERE salary>=10000SELECT employee_name, salary FROM human_resourceGROUP BY salary HAVING COUNT(*)>=10000SELECT salary FROM human_resourceWHERE employee_name >=10000 GROUP BY salary
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.