Skip to content
Advertisement

Delete statement not working on query in oracle

I have a table BK_178_ABC. I want to perform delete statement on this table only when some condition is satisfied:

My total count on this table is:

I have this condition below,if it satisfies then I need to delete from this BK_178_ABC table.So,I first calculated what is the total no of rows going to be deleted.So,I tried the statement below.

So,the count to be deleted is : 2902563.

I tried two delete statement but,both of them gave me wrong count.Since,my expected count is 2902563,but I am not getting the correct result.

It,emptied the whole table, as total count deleted I see is : 22024727

So,I refactored this above code again,tried another delete statment:

I see that rowcount is zero. What is the problem in my sql statment?

Advertisement

Answer

You can use IN as follows:

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement