sql - In Firebird, how to return the ids of the deleted rows? -


i return ids have been deleted delete query.

on stackoverlow, found this: how id of last updated row in mysql?

the top1 answer has nice solution, it's mysql. tried same in firebird after reading part of firebird manual:

set term ^ ;  execute block     declare variable uids blob sub_type text; begin     delete category name = 'haló'     , ( select id :uids );     select @uids; end ^ 

yes, know 'uids' contain 1 id, since i'm overwriting variable, it's test, , more, doesn't work. stops @ 'into' saying "token unknown - line 8, column 21". don't know do, continue with.. :\

thanks help!

for this, please run separate queries

  1. first fetch record ids want delete same condition delete

like, select id category name = 'haló'

  1. then delete records

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -