Reputation: 41
My first select statement would be like below,
SELECT m.col_name
, m.col_alias
FROM <table_name> m
WHERE m.exportable LIKE '%Y%'
And I'm trying to create a second select query with the data that I'm receiving from the first statement, like below
SELECT tabella.id alias_1
, tabella.value alias_2
, **“list of col_name result of the previous query”
FROM <another_table> tabella
WHERE tabella.metadata_id = 'CI_INDEX||CI_01'*
Thanks in advance.
Upvotes: 0
Views: 68
Reputation: 31
If the tables have relation between them then go for Join
if the tables do not have relation you can use the following format.
select table1.col1,table2.col1 from table1, table2
where table1.colx like '%exp%' and table2.coly like '%exp2%'
Upvotes: 0