Write a postgre SQL statement to change the salary of an employee to 8000 whose ID is 105, if the existing salary is less than 5000
- Postgre SQL
- 2021-09-29
- mhanasmh00489829403
الأجوبة
UPDATE employees SET SALARY = 8000
WHERE employee_id = 105
AND salary < 5000;
Output:
See the result. Only the effected rows have been displayed.
postgres=# SELECT * FROM employees
WHERE SALARY = 8000
AND employee_id = 105;
employee_id | first_name | last_name | email | phone_number | hire_date | job_id | salary | commission_pct | manager_id | department_id
-------------+------------+-----------+---------+--------------+------------+---------+---------+----------------+------------+---------------
105 | David | Austin | DAUSTIN | 590.423.4569 | 1987-06-22 | IT_PROG | 8000.00 | 0.00 | 103 | 60
(1 row)أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال
معلومات ذات صلة