Fixed #18782 -- Prevented flush with views

The query you want here to eliminate 2 separate queries is:

```SELECT TABLE_NAME, 't' FROM USER_TABLES UNION ALL SELECT VIEW_NAME, 'v' FROM USER_VIEWS```

And then you can use the same logic you used with the postgres backend.