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
- first fetch record ids want delete same condition delete
like, select id category name = 'haló'
- then delete records
Comments
Post a Comment