I have a table called pages
with the following fields:
- page_id
- f_page_object_id
- deactivation_date
- deactivation_editor
- is_published
When I want to deactivate a page, I need the f_page_object_id returned to be able to edit the connected row of a different table too.
I tried using OUTPUT INSERTED, but it does not seem to work (giving syntax error). I was wondering if I am using it right and it is even possible here:
UPDATE `pages` SET deactivation_date = '2016-01-14 16:10:31', deactivation_editor = 'test', is_published = '0'
OUTPUT INSERTED.f_page_object_id
WHERE page_id = 291;