0

In my postgres DB I have tables starting with name d_m* and each of these tables have a status column. I want to find rows where status column has a value 'R'. For example- My tables are like d_m1, d_m2. Columns in these tables are id, status, date

I eventually want to know all ids where status ='R'

I can find tables\cols but not col values select * from INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA = 'public' and TABLE_NAME like 'd_m%' and COLUMN_NAME like 'status%'

0 Answers0