Useful shortcuts for vi editor

Monday 17 October 2016

How to use rowid for deleting data?

If you desire delete data from joined tables such as log table, you may use rowid to prevent delete unwanted rows.

e.g.

delete from tableA where rowid in (select a.rowid from tableA a, tableB b where a.columnA = b.columnB);