Error: table name specified more than once

0

I created a column included in the app table, it works to record the purchase date of the application and I will have to update the old records with the date of user creation. I have done a query to solve the problem, but postgreSQL has an error:

  

ERROR: table name "app" specified more than once

This is my query:

UPDATE app
  SET app.inclusao = usuario.inclusao
  FROM app, usuario
  WHERE app.usuario = usuario.codigo

How do I resolve this?

    
asked by anonymous 24.02.2015 / 20:35

1 answer

2
update app
    set inclusao = usuario.inclusao
    from usuario
    where app.usuario = usuario.codigo
    
24.02.2015 / 20:43