Home > Back-end >  How to ind only one record with UNION ALL in multiple tables
How to ind only one record with UNION ALL in multiple tables

Time:02-19

Sorry for the title of the question...

There are multiple records with the same data_name in different tables and with different time_inserts.

I need data_name with older time_insert. I cannot JOIN but only UNION ALL

  1. data_name is type VARCHAR2 (255 BYTE)
  2. time_insert is type TIMESTAMP (6)

This query works but is slow. I think it is not performing

select data_name,token,time_insert,path from table_0 where (data_name,time_insert) in 
(select data_name, min(time_insert) from table_0 where data_name like '           
  • Related