Personal I need to make an update on a table but it has to be from a select ... type I have a select with joins and etc, then it returns about 3545 records need to make an update in this table, how?
update starting a select
Friend I do not know if I understood your doubt more if not this in the tries again: lol:
UPDATE copy_emp
SET department_id = (SELECT department_id
FROM employees
WHERE employee_id = 100)
WHERE job_id = (SELECT job_id
FROM employees
WHERE employee_id = 200)
- dr_gori
- Moderador
- Posts: 5024
- Joined: Mon, 03 May 2004 3:08 pm
- Location: Portland, OR USA
- Contact:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
You have to give more information about how this update is.
A "basic" form of doing this is like this:
A "basic" form of doing this is like this:
UPDATE tabela y
SET campo = (select campo
FROM xxxxxx z
WHERE z.chave = y.chave)
WHERE .... ( retorna as 3545 linhas)
-
- Information
-
Who is online
Users browsing this forum: No registered users and 18 guests