delete_subst.sql
1.02 KB
SELECT set_config('var.user_id', '0', false);
delete FROM odsylacze WHERE l_id_do in (select id from leksemy where ("leksemy"."slownik" = 'Morfologik' and pos in ('subst', 'osc', 'skrs')));
delete FROM odsylacze WHERE l_id_od in (select id from leksemy where ("leksemy"."slownik" = 'Morfologik' and leksemy.pos in ('subst', 'osc', 'skrs')));
delete FROM odmieniasie WHERE l_id in (select id from leksemy where ("leksemy"."slownik" = 'Morfologik' and leksemy.pos in ('subst', 'osc', 'skrs')));
delete FROM leksemy_w_slownikach WHERE l_id in (select id from leksemy where leksemy.pos in ('subst', 'osc', 'skrs') and slownik = 'Morfologik');
delete FROM leksemy_w_slownikach WHERE l_id in (select id from leksemy where leksemy.pos in ('subst', 'osc', 'skrs')) and slownik = 'Morfologik';
delete FROM kwalifikatory_leksemow WHERE lexeme_id in (select id from leksemy where leksemy.pos in ('subst', 'osc', 'skrs') and slownik = 'Morfologik');
delete FROM "leksemy" WHERE ("leksemy"."slownik" = 'Morfologik' and leksemy.pos in ('subst', 'osc', 'skrs'));